St Andrews Railway
The St Andrews Railway was an independent railway company, founded in 1851 to build a railway branch line from the university town of St Andrews, in Fife, Scotland, to the nearby main line railway. It opened in 1852. When the Tay Rail Bridge opened in 1878 residential travel to Dundee was encouraged. The railway was engineered as a low-cost line by Thomas Bouch and the company suffered adversely from that in later years, and sold their line to the larger North British Railway in 1877. The line was successful until road transport competition began to abstract traffic, and when the Tay Road Bridge opened in 1966, 40% of the line's passenger carryings were lost immediately. Decline continued and the line closed completely in 1969. History

Before the St Andrews Railway
The town of St Andrews is ancient. The University of St Andrews was founded in 1411, but there was relatively little industry in the town, linen weaving being the chief occupation., and agriculture; there was a paper mill at Guard Bridge. The engineer Robert Stevenson was commissioned to survey a railway route crossing Fife in 1819; the route he selected was similar to the later Edinburgh, Perth and Dundee Railway, running some distance from St Andrews. However this would have been a long distance route and the steam locomotives of the day were not practicable, and the scheme was dropped. In 1835 John Geddes surveyed a line from Burntisland to Ladybank, forking there and running respectively to Perth and the location that became Tayport. This scheme too failed to develop into a proposal, but a revised survey of 1840 gained support as the economic situation improved, and as railways elsewhere had demonstrated that longer distances could be handled by railways. In 1840 the Edinburgh and Northern Railway was proposed, following this route, and the proposal led to an authorising Act of Parliament on 31 July 1845. There were some late changes to the proposed route, but the Edinburgh and Northern Railway's line opened on 20 September 1847 between Burntisland and Cupar by way of Kirkcaldy and Ladybank. The Company had changed its name on 27 July 1847 to the Edinburgh Perth and Dundee Railway (EP&DR) on merging with its partner railway at Granton. It extended to Leuchars, not far from St Andrews on 17 May 1848. The Edinburgh and Northern was an immediate success, although the Forth had to be crossed by ferry from Granton: at this stage there was no question of bridging the Forth or the lower Tay. The original prospectus for the Edinburgh and Northern had included a branch line to St Andrews, but this was not included in the Parliamentary Bill; by November 1846 shareholders were asking if the St Andrews branch should now be addressed, and in the following Parliamentary session, a Bill was presented, and the Edinburgh and Northern Railway (St Andrews and Newburgh Harbour Railway Extension) Act was passed on 22 July 1847. At this stage, before the first train had run on the main line, the Edinburgh and Northern, soon to be the EP&DR, was concentrating its resources on construction of its extensive original routes; completion to Ferryport-on-Craig (renamed Tayport) and giving ferry access to Dundee was only achieved on 17 May 1850 and by now the Company had run out of money. A local scheme
People in St Andrews, seeing the reality of the Edinburgh and Northern position, decided that independent action was called for, and on 19 December 1850 a meeting agreed to promote a local scheme. They moved quickly and obtained the authorisation for their railway by the St Andrews Railway Act of 3 July 1851, with capital of £21,000. It was emphasised that the subscribers to the line were local, avoiding getting involved in the contrary strategies of remote shareholders, and the directors of the new company had no previous railway experience. They engaged as their engineer Thomas Bouch, and the contractor was Kenneth Matthieson. This was Bouch's first commission in private practice, and he determined to make a name for himself by designing cheap local railways; he argued that the later profitability of heavily engineered lines was dragged down by large and unnecessary costs at the construction stage. Once again the Company moved quickly, for the contract for construction was signed with Matthieson on 11 August 1851. The new line was to make a physical junction with the Edinburgh and Northern line about a mile south of Leuchars station; the village of Leuchars was small at the time. There was to be one intermediate station at Guardbridge, immediately west of the River Eden crossing. St Andrews was a considerable community at the time, and the station there was some distance short of the centre, at the "sheep park", just beyond the seventeenth hole of the Old Course. The Royal and Ancient Golf Club had vigorously opposed a closer approach. Completion and opening 
Construction proceeded well and opening was anticipated for the end of June 1852. The line travelled over flat land which had been cheaply acquired. An arrangement with the Edinburgh and Northern Railway whereby they would work the trains was concluded, to run for 25 years from 1 July 1852, with the E&NR paying 4.5% on St Andrews Railway shares. Captain Laffan of the Board of Trade inspected the line on 24 June 1852 and approved it for opening. There was an official opening ceremony on 29 June 1852 and a full public opening on 1 July 1852. The line had cost £21,565 to construct. The train services consisted of four trains each way daily except Sundays. Passenger traffic developed well, and there was a considerable volume of excursion traffic in to St Andrews. Coach services were run from some of the nearby towns, including Crail, Pittenweem and Anstruther, to St Andrews, enabling onward travel by train. The journey on the branch took twenty minutes. July saw a "monster" excursion to Glasgow. Goods traffic was less significant, reflecting the relative absence of industry at St Andrews. Although some improvements had been made to the Leuchars station (which had been built as a rudimentary wayside stop) there were complaints about the connectional arrangements there; the branch trains made poor connections with the main line trains, and delays were attributed to improper formation of the main line trains. Poor quality of track and bridges
As early as 1853 the Company was experiencing difficulty with the permanent way; Bouch's scheme for cheap railway construction had included laying sleepers at a pitch of four feet, considerably wider spacing than was usual. There were two significant timber trestle bridges over tidal water, at the Water of Mottray and the River Eden. At this time they were considered to be deteriorating, and it was observed that they had not been treated with preservative at the time of construction: another of Bouch's cost-saving measures. On 29 July 1862 the EP&DR was taken over by the North British Railway (NBR). The larger company reviewed the arrangements at St Andrews. Locomotive technology had developed over these early years, and heavier and more efficient locomotives were in common use; the NBR wished to bring them on to the line, but the track and the bridges were considered not strong enough to accommodate them. It was said that £16,000 to £20,000 was required to replace the wooden bridges, and this was utterly beyond the financial resources of the St Andrews Company, which now began to think of selling their line to the NBR. Bouch was asked directly by the NBR Chairman to consider the matter and he estimated that £12,561 was enough to relay the track in stronger materials and to replace the two bridges. When the St Andrews Railway Board discovered that this discussion had been taking place behind their backs, they were outraged: "No company would employ engines of 30 tons or upwards to work a branch 4½ miles in length." Hodgson, the Chairman of the North British Railway had been preparing plans to absorb the St Andrews Railway, but the Board of the latter made it clear that they would oppose any Parliamentary Bill for such an acquisition, and the NBR was obliged to let the matter drop. Notwithstanding the bad feeling between the two Companies, the contractual working agreements was still in force, and from June 1863 there were seven passenger trains each way daily, an eighth on Saturdays. On 16 May 1864 there was a derailment at Guardbridge. An afternoon train from Leuchars to St Andrews hauled by an 0-4-2 locomotive running tender first and hauling four passenger vehicles, derailed at a rail joint that had become displaced. The tender and locomotive left the track, but there were no injuries. Captain Rich of the Board of Trade reported on the accident, and he was extremely critical of the state of maintenance of the track; he concluded: "The accident ... was caused by the bad state of the St Andrews Railway." He said that, "The line is of very light and poor construction," and that the chairs "are weak, too narrow in the throat to admit a good key, and reported to be continually breaking". He added "I consider that the whole permanent way wants renewing." He was also critical of the strength of the river bridges, and of the signals on the line. The Board of the St Andrews company evidently did not agree, for they protested that the wooden bridges were never intended to be permanent, and at the next Shareholders' Meeting declared the customary dividend of 4.5% instead of allocating any income to capital works improvements. Sale to the North British Railway
The original working agreement with the Edinburgh and Northern Railway, inherited by the North British Railway, was due to expire on 31 July 1877, and this concentrated the mind of the St Andrews Company's proprietors on the difficulties of running a small railway company; they agreed to absorption by the North British Railway in 1877, ratified by the North British Railway (Amalgamation) Act of 1 August 1877. This took effect in October 1877, with the £21,000 capital of the St Andrews Company exchanged for 10.5% North British Railway St Andrews Lien Stock, earning a remarkable preference dividend of 10.5%. Leuchars Junction station
The Leuchars station had been built at the village, but on 1 June 1878 the new line from near Leuchars to Dundee over the Tay Bridge was opened. This line made a junction with the Tayport line south of Leuchars station, but near the physical junction of the St Andrews line. The North British Railway opened a new station, Leuchars Junction, at the location and closed the original Leuchars station. This was all very well for interchange purposes, but was heavily criticised by the people of Leuchars, and on 1 December 1878 the earlier station was re-opened, being named Leuchars (Old). The opening of the Tay Bridge resulted in a considerable increase of passenger traffic to St Andrews, including an upsurge of excursion trains from Dundee. The passenger service on the branch was enhanced to 12 each way, and residential travel to Dundee began to grow significantly. However, there was never a Sunday service on the St Andrews line: it was said that to offer Sunday trains would only encourage vulgar day-trippers. Connecting Anstruther
On 1 September 1863 Anstruther was connected to the Scottish railway network, from Leven. Anstruther is eight miles from St Andrews, and public opinion demanded that the two important towns should be connected directly by a railway. This was not immediately forthcoming, until the Anstruther and St Andrews Railway was authorised by Act of 26 August 1880. The terrain forced a circuitous route of 16 miles, with none of the intermediate stations close to the communities they purported to serve. The line was to run to Argyle, on the south-eastern side of St Andrews, and not close to the St Andrews Railway terminus. During construction of the Anstruther line, the contractor became bankrupt, and there was some delay in resuming the work. There were to be two St Andrews stations on opposite sides of the Burgh and the North British Railway proposed a payment of £5,000 to a line connecting the stations and to the costs of the new through station That was agreed to, and was sanctioned by a second Anstruther and St Andrews Railway Act, of 16 July 1883. The Anstruther line approached rather slowly, reaching Boarhills in 1883, but it took until 1 July 1887 to open throughout to St Andrews. The new through station was now the sole St Andrews passenger station; the former station was converted to a goods station, named St Andrews Links. (In August 1897 the proprietors of the Anstruther company sold their line to the North British Railway.) Bouch's work replaced
Bouch's Tay Bridge collapsed on 28 December 1879, taking 59 lives with it, in the Tay Bridge disaster. The North British Railway built a replacement and it opened on 20 April 1887 to goods traffic. The first ordinary passenger train crossed on 20 June 1887, and there was a considerable resurgence of traffic to St Andrews. On a much smaller scale, the two river bridges on the St Andrews line that Bouch had designed were by now in urgent need of replacement, and this was achieved in 1889. 1895 passenger service
The Tay Bridge encouraged much passenger business. The 1895 Bradshaw shows seventeen trains each way on the branch (and one extra on Wednesdays and Saturdays); the journey time from St Andrews to Leuchars was typically 15 minutes and  Dundee could be reached from St Andrews in 38 minutes. The twentieth century
On 25 January 1909 the Newburgh and North of Fife Railway opened, giving a direct connection from Leuchars to Perth and St Andrews had a daily passenger train to Perth. In 1923 the railways of Great Britain were "grouped" following the Railways Act 1921, and the North British Railway was a constituent of the new London and North Eastern Railway (LNER). From 1925 bus services made serious inroads into passenger carryings on the St Andrews line. In 1948 the railways were again re-organised by Government, and taken into state ownership. The lines in the area were now part of the Scottish Region of British Railways. From this time, the goods traffic, already insubstantial, was also seriously hit by road competition. Diesel multiple units were introduced on the line from 15 June 1959. The decline in use of the lines accelerated, and the southward route from St Andrews to Crail closed to passengers on 4 September 1965, and to goods on 18 July 1966. In addition Guardbridge station closed to passengers on 4 September 1965, and on 20 June 1966 Guardbridge and St Andrews Links stations closed to goods traffic. The opening of the Tay Road Bridge in August 1966 immediately led to a 40% reduction in passenger usage of the St Andrews line. In the midst of this depressing situation, the British Transport Commission built a new luxury hotel at St Andrews; it opened on 25 June 1968. The passenger business on the line was presumed to be terminal, and it was announced that the line would close in 1969. The Burgh Council protested, and British Railways offered to keep the railway open if the Council would make up the loss on the train service, £20,000 annually. The Council declined the offer and the line closed to all traffic on 6 January 1969. There is no railway use of the former line and the original Links Station has been largely absorbed by the Old Course Hotel (although the Station Master's House remains as a public house, Jigger Inn; the platforms of the St Andrews New station have been removed, the station cutting partially in-filled and a car park and recycling facility now occupies the site. The alignment from Petheram Bridge to the site of the (former) passenger station and has not been built upon and is today utilized as a footpath. Topography
Locations on the passenger route from Leuchars were:

 Leuchars; station on Edinburgh, Perth and Dundee Railway line; renamed Leuchars Junction 1 July 1852; closed 1 June 1878; re-opened 1 December 1878 as Leuchars Old; closed 3 October 1921; 
 Leuchars; opened 1 June 1878;
 Guardbridge; opened 1 July 1852; closed 6 September 1965; often written as Guard Bridge;
 St Andrews; opened 1 July 1852; reduced to goods station and renamed St Andrews Links, 1 July 1887;
 St Andrews; station on Anstruther and St Andrews Railway; opened 1 June 1867; closed 6 January 1969. The  St Andrews Rail Link Campaign - 'StARLink'
On 4 September 1989, a formal campaign was launched to reconnect St Andrews to the rail network. Operating under the acronym StARLink, the St Andrews Rail Link Campaign has advocated for the reconnection of St Andrews to the railway. A report and track-layout proposal was developed in 2012 by Tata Steel and in summer 2015 StARLink launched its own pages on the social networking internet platforms Facebook and Twitter. StARLink continues to make the case for a new St Andrews railway, to which end its campaign regularly features in local and national media, both in print and on radio. More recently, StARLink has sought to draw comparisons with other Scottish rail links that have been reinstated sequel to their historical closure. See also
 Railscot on St Andrews Railway

Notes

References

Closed railway lines in Scotland
Railway lines in Scotland
Early Scottish railway companies
Standard gauge railways in Scotland
North British Railway
Pre-grouping British railway companies
Railway lines opened in 1852
1851 establishments in Scotland
St Andrews
Transport in Fife
Railway lines closed in 1969
1969 disestablishments in Scotland