Dunfermline is a city, parish, and former royal burgh located in Fife, Scotland. It is situated approximately 3 miles (5 km) from the northern shore of the Firth of Forth.
Historically, Dunfermline served as the de facto capital of the Kingdom of Scotland between the 11th and 15th centuries.