The B9131 is a secondary 'short cut' across east Fife, connecting the A917 in Brownhills (just east of St Andrews) to the same road in Anstruther Easter via Stravithie and Drumrack.
On reaching Anstruther, the B9131 first crosses the A917 then makes a short loop through the conjoined village of Cellardyke before returning northwestwards to end on the same A-road. The original route through the villages seems to have been along James Street, then left up Tollbooth Wynd and Toll Road. However, the 1962 OS One Inch map shows the parallel West Forth Street as the B9131, and modern mapping suggests that both form part of the route, although both are narrow, two way and have give way lines at each end. Indeed, the signed route is along the unclassified Burnside Terrace and Fowler Street.
In 1922 the road north of the A917 was numbered B944 whilst the loop through Anstruther was unclassified. By 1932 the B9131 had come into existence as the loop whilst the cross-peninsula road had been upgraded to become the A959. Some older maps, such as the 1939 OS Ten Mile Map suggest that the route continues east through Cellardyke as a spur, or perhaps a different numbered B road. However, no other supporting evidence has been found, so it is presumed this is down to the limitations of the scale.
The A959 was downgraded in the 1980s, along with a number of other roads in East Fife, and became a northerly extension of the B9131, giving our road its present route.