 Suddenly the E&GR found that it had no railway link to the S&DR, and the S&DR found itself isolated.A line from Dunfermline to Charlestown Harbour was already in existence, and the S&D line was constructed from east to west, taking advantage of the facility.The first section, from Dunfermline to Oakley, opened on 13 December 1849.