The town was founded as a garden city in 1909, and was built to form the coastal port of Dunfermline. Rosyth is almost contiguous with neighbouring Inverkeithing, separated only by the M90 motorway. Rosyth railway station is on the Fife Circle Line.