The first passenger "main line" to arrive in Dunfermline was the route from Thornton in which was opened in 1849 and later extended to North Queensferry and subsequently across the River Forth. This line is in frequent use today as part of the Fife Circle.


In 1852, a connection was made between Dunfermline and Stirling. This line required a new station to be constructed, which was given the name Dunfermline Upper. Other Fife stops on this new route were Oakley, Bogside, East Grange and Forest Mill. The line continued to Stirling via Clackmannan and Alloa.


Besides coal traffic, a major freight concern in the early working days of the line was the Oakley Ironworks, which employed hundreds of men but ceased production in 1869. Mining thrived in this part of Fife long after other towns had lost their pits. Comrie Colliery was in operation until 1986 and had its own branchline (covered on a separate page). Blairhall Colliery was adjacent to the main line and served by a short spur. The massive Longannet Complex, comprising several interlinked mines, had its own underground transport system feeding the power station directly and didn't need to make use of the railway facilities above.


Forest Mill Station was closed in 1930, being too far from Kincardine to be of much practical use. Passenger numbers began to decline seriously across the country during the post-war years and the little-used halts were weeded out. Bogside and Eastgrange bit the dust in 1958, a reminder that many stations did close before Lord Beeching arrived on the scene. Nevertheless, the line continued to provide a strategic central-belt connection. A journey from Dunfermline to Stirling today requires a hugely inconvenient dog-leg around Edinburgh.


The end came in 1968 when passenger services were permanently withdrawn on the whole line. The centrally-located Dunfermline Upper Station became derelict, it was finally demolished in 1989 and a retail park now stands on the site. Alloa fared even worse, this former rail hub lost all its connections and became a railway desert.


Freight traffic was allowed to continue along the entire route until 1979, when the tracks in Fife were pared back to Oakley, only the output of Comrie Colliery keeping the last section alive. The coal wagons were channelled on to the other Dunfermline main line at Townhill Junction. When the pit was controversially closed following the miners' strike, the remaining rails were lifted in 1987.


Most of the route between Dunfermline and Clackmannan is now a well-patronised cycle track. In 2008, there was cause for celebration in Scottish railway circles when the section between Alloa and Stirling was reopened to passenger traffic. Curiously, this stretch of track had been allowed to rust away in-situ during the years of closure. A welcome addition to the rail network indeed, but one that lies outwith the scope of this article. Here we lament the loss of a link between two highly-populated areas of central Scotland. Mr Beeching, what were you thinking of?



If you stand on the footbridge at Dunfermline Queen Margaret station, you can clearly see the junction between the Fife Circle line and the old Dunfermline to Stirling railway. A short stretch of track is still in situ. The double-arched bridge is a dead giveaway that two railways converged here. Unfortunately, the top of this bridge is inaccessible. Queen Margaret was opened as recently as 2000, whereupon Dunfermline station had the word Town appended to its title. Dunfermline had been previously been known as Dunfermline Lower, to differentiate it from Dunfermline Upper, which was on the Stirling route.



Crossing the B912 outside Queen Margaret Station, we gain access to the trackbed, which has now been converted to a path for walkers and cyclists. The track continues for a mile in more or less a straight line towards the centre of Dunfermline. The route is well patronised by the local community and now provides a useful public amenity rather than being an overgrown strip of land.



The line passes through a shallow cutting. The overbridge leads to Dunfermline Cemetery.



The disadvantage of cleaned-up walking paths is that the chances of stumbling across a railway relic are very much reduced. But reminders do emerge from time to time. This bridge was formerly the second one on the line. Today it is the first.



Rusting hooks are embedded into the interior stonework of the bridge. Presumably they carried some sort of cabling.



The walking route comes to an end at East End Park, home of Dunfermline Athletic FC. The club purchased the trackbed that ran behind the stadium for use as a bus park. A large of number of Scottish football grounds were built in close proximity to a railway. There were three on this route alone, the line running past Recreation Park (Alloa) and Forthbank, home of the long-forgotten King's Park who were Stirling's representative in the Scottish League until 1945.



The town-centre missing link! One of the main reasons that so many closed routes will never reopen is the fact that urban stretches of trackbed have disappeared under car parks and shopping centres. In the distance is Halfords store, where Dunfermline Upper station previously stood. There's not much point in having a closer look as no trace of the station remains. Dunfermline train shed was located somewhere on the left of this picture.



A derelict 800-yard section of the route still exists in the centre of Dunfermline. Here we see an old-style footbridge over the line at Phoenix Lane. The trackbed extends left and right but further exploration was hindered due to lack of a machete. Perhaps a visit in winter would be a more viable proposition. This is the sort of railway structure that you would normally make a point of seeing before it finally gets pulled down, but apparently the bridge is a listed building! Let's rip up a 20-mile-long railway but protect a rusty old crossing point from the demolition gang. Brilliant!



 The viaduct at Buffies Brae is still in good condition.



The end section of the vidauct has been removed. Most probably it was a stretch of metal decking.



The stone bridges on the line remained intact after closure. Here the road to Blairhall passes under the tracks.



The concrete decking on this bridge has been added during the building of the cycle track.



On top of the Dean Viaduct, about a mile west of Oakley.



A well-preserved cutting, with the original retaining wall still in place.