It becomes Scotland’s eighth city.
Dunfermline and St Andrews were both put forward to the competition, keen to see their heritage recognised and their historical status officially restored, and both bids were supported by Fife Council.
Both were strong contenders, with Dunfermline a growing urban centre and historical capital of Scotland, and St Andrews known worldwide as the home of golf and Scotland’s first university.
Fife rapist dangled pregnant sex attack victim over railway bridge
Two drivers in Fife caught doing more than 100mph as one had kids in car
Leven Promfest: Fife town set for weekend of live music and family entertainment
Video: Baby seagull rescued from rock gig - then takes part in heavy metal conga
Community urged to get behind Kirkcaldy Parks Running Festival as volunteers sought
Provost Jim Leishman said. “I’d like to congratulate Dunfermline and say thank you to all those who put in so much effort with the bid to get Dunfermline recognised as a city.
“And commiserations to St Andrews and all those who pulled out all the stops to put forward an excellent submission.
“We look forward to being able to say ‘officially’ – Welcome to the City of Dunfermline! “
Dunfermline was one of eight places across the UK awarded city status.
The others were Bangor in Northern Ireland, Colchester, Doncaster and Milton Keynes in England, Douglas in the Isle of Man, Stanley in the Falkland Islands and Wrexham in Wales.
Provost Leishman, said: “The official title of city will give Dunfermline the wider recognition that it deserves as one of the fastest-growing, urban areas in Scotland, offering all the amenities that any modern city could hope for.
“City status will help us grow economically and as a tourist destination and will have a positive impact on Dunfermline and the surroundings.
“Of course, the people of Dunfermline have always known that Dunfermline is a city, that’s why we have the City Car Park, the City Hotel and City Cabs but it’s great to finally get official recognition of this. “