The A987 was a short link road in south Fife. The route started at the Bernards Smithy Crossroads where it met the A907 (now also the B9157) and A909. It then headed west before curving to the southwest along the Queensferry passage with only one road junction en route at White Lodge. After going under the railway line the route ended on the A92 (now A921) west of Aberdour.
Unclassified in 1922, this stretch of road had become the B924 by 1932. It retained Class II status before gaining the A987 number at some point between 1961 and 1964. This survived until the late 1980s renumberings in Fife as a result of the new A92 route being opened - it is still shown in the 1988 Readers Digest Atlas. At this point the road regained Class II status, becoming part of the B9157.
During its life it was a primary route, as was the eastern part of A907, in preference to the A92 as it bypassed the coastal towns west of Kirkcaldy. However it does not appear to have been a trunk road, so either the A92 remained trunk or there was a gap in the trunk route; map evidence found so far is inconclusive.
The 1961 OS Quarter Inch map shows the B924 number