 The line was opened in 1831 from St Leonards to Dalhousie Mains, with a branch line to Fisherrow, a small harbour just to the west of Musselburgh.A businessman started operating passenger coaches, also horse drawn, from 1832, and this was very successful; the railway company itself later took over the passenger operation.A branch line to Leith, to give better access to shipping, opened in 1832.