A remarkable 517-m (566-yard) excavation on the former Edinburgh and Dalkeith Railway, the Innocent Railway Tunnel (or St. Leonard's Railway Tunnel) was the first public railway tunnel in Scotland. It begins in the Maltings housing development on Holyrood Park Road, a mile (1.5 km) southeast of the centre of Edinburgh and slopes steeply beneath the University of Edinburgh's Pollock Halls to emerge below Samson's Ribs on the edge of Holyrood Park.
Lined with Craigleith sandstone, the tunnel is 4.5m (15 feet) high and 6m (20 feet) wide. It was built in 1831 by James Jardine (1776 - 1858) at a cost of £12,000 to convey a double-track railway. It originally required a stationary steam engine haul the wagons up a 1-in-30 inclined plane to St. Leonards Goods Yard. This arrangement continued until the line was acquired by the North British Railway in 1845, and horses were replaced by steam locomotives as the means of traction.
This section of the line closed in 1968. By 1981 it was available as part of a walking route and was later given a tarmac surface. In 1994 it was adopted by Lothian Regional Council as part of National Cycle Route No.1, which runs from Dover to the Shetland Islands. Once lit by gas, the tunnel now is now permanently illuminated by electricity.