Dunfermline (Scottish Gaelic: Dùn Phàrlain) is a town in Fife, Scotland. It sits on high ground three miles from the northern shore of the Firth of Forth, northwest of Edinburgh, and was an ancient capital of Scotland. It is home to Dunfermline Athletic F.C. who play at East End Park.