Dunfermline is a city, parish, and former royal burgh in Fife, Scotland, 3 miles from the northern shore of the Firth of Forth. Dunfermline was the de facto capital of the Kingdom of Scotland between the 11th and 15th centuries.
To the south of Dunfermline is the town of Rosyth. To the north are the villages of Townhill, Wellwood and Kingseat. To the west are the towns of Crossford and Oakley. And to the east are Cowdenbeath and Crossgates.
The earliest known settlements around Dunfermline probably date to the Neolithic period, growing by the Bronze Age. From Wikipedia