Dunfermline is a town and former Royal Burgh in Fife, Scotland, on high ground from the northern shore of the Firth of Forth. The 2011 census recorded the town's population at 49,706, however figures released in 2012 estimate Dunfermline's population as 50,380, making it the largest locality in Fife and the tenth largest in Scotland. Until the 17th century, the town served as the royal capital of Scotland.
The area around Dunfermline became home to the first settlers in the Neolithic period, but did not gain recognition until the Bronze Age as a place of importance. The town was first recorded in the 11th century, with the marriage of Malcolm III, King of Scotland, and Saint Margaret at the church in Dunfermline. As his Queen consort, Margaret established a new church dedicated to the Holy Trinity, which evolved into an Abbey under their son, David I in 1128. Following the burial of Alexander I, the abbey graveyard confirmed its status as the mausoleum of Scotland's kings and queens.
The town is a major service centre for west Fife. Dunfermline retains much of its historic significance and provides numerous retail and leisure facilities. Fife College, formally Carnegie College, also have a campus at Halbeath. Employment is focused in the service sector, with the largest employer being BSKYB. Other large employers in the area include Amazon (on-line retailer), Best Western (hotels), BSKYB (home entertainment and communications), CR Smith (windows manufacturing), FMC Technologies (offshore energy), Lloyds and Nationwide (both financial services).
Dunfermline has undergone constant unprecedented expansion since 1999, in what is called the Dunfermline Eastern Expansion, known locally as 'DEX'. The expansion has seen the town grow eastward towards the M90 corridor and is planned to continue until 2022. Major developments include the creation of Dunfermline's Duloch and Masterton neighbourhoods, three new primary schools, new community infrastructure and Fife Leisure Park. The expansion has seen the town's population rise dramatically, with some community groups calling the new suburbs a 'dormitory town' for Edinburgh commuters. Fife Council have begun drafting plans for an expansion of a similar scale on Dunfermline's south-west, west and north sides, which will see the creation of 4,000 homes, a new high school and three new primary schools in the first phase.
The peacock is strongly associated with Dunfermline, and is considered a local icon. Linked to the town's Pittencrieff Park, free-range peacocks and peahens have had the freedom of Dunfermline since the 1900s. In 2014 the park became home to a peacock sanctuary.
There have been various interpretations of the name, "Dunfermline". The first element, "dun" translated from Gaelic, has been accepted as a (fortified) hill, and is assumed to be referring to the rocky outcrop at the site of Malcolm Canmore's tower in Pittencrieff Glen (now Pittencrieff Park). The rest of the name is problematic. The second element, "the ferm" may have been an alternative name for the Tower Burn according to a medieval record published in 1455 and that, together with the Lyne Burn to the south, suggest the site of a fortification between these two watercourses.
The first record of a settlement in the Dunfermline area was in the Neolithic period. This evidence includes finds of a stone axe, some flint arrowheads and a carved stone ball which was found near the town. A cropmark which is understood to have been used as a possible mortuary enclosure has been found at Deanpark House, also near the town. By the time of the Bronze Age, the area was beginning to show some importance. Important finds included a bronze axe in Wellwood and a gold torc from the Parish Churchyard. Cist burials from the Bronze Age have also been discovered at both Crossford and Masterton, the latter of which contains a pair of armlets, a bronze dagger and a set necklace believed to have complemented a double burial.
The first historic record for Dunfermline was made in the 11th century. According to the fourteenth-century chronicler, John of Fordun, Malcolm III, King of Scotland (reign 1058–93) married his second bride, the Anglo-Hungarian princess, Saint Margaret, at the church in Dunfermline between 1068 and 1070; the ceremony was performed by Fothad, the last Celtic bishop of St Andrews. Malcolm III established Dunfermline as a new seat for royal power in the mid-11th century and initiated changes that eventually made the township the de facto capital of Scotland for much of the period until the assassination of James I in 1437. Following her marriage to King Malcolm III, Queen Margaret encouraged her husband to convert the small culdee chapel into a church for Benedictine monks. The existing culdee church was no longer able to meet the demand for its growing congregation because of a large increase in the population of Dunfermline from the arrival of English nobility coming into Scotland. The founding of this new church of Dunfermline was inaugurated around 1072, but was not recorded in the town's records.
The Union of the Crowns ended the town's royal connections when James VI relocated the Scottish Court to London in 1603. The Reformation of 1560 had previously meant a loss of the Dunfermline's ecclesiastical importance. On 25 May 1624, a fire engulfed around three-quarters of the medieval-renaissance burgh. Some of the surviving buildings of the fire were the palace, the abbey and the Abbot's House.
The decline in the fortunes of Dunfermline lasted until the introduction of a linen industry in the early 18th century. One reason for which the town became a centre for linen was there was enough water to power the mills and nearby ports along the Fife Coast. These ports also did trade with the Baltic and Low Countries. Another reason was through an act of industrial espionage in 1709 by a weaver known as James Blake who gained access to the workshops of a damask linen factory in Edinburgh by pretending to act like a simpleton in order to find out and memorise the formula. On his return to his home town in 1718, Blake established a damask linen industry in the town. The largest of these factories was St Leonard's Mill which was established by Erskine Beveridge in 1851. A warehouse and office block was later added around 1869. Other linen factories were built on land to both the north and south ends of the burgh. During the mid-19th century, powerloom weaving started to replace linen damask. The latter did not survive, going into decline straight after the end of First World War. In 1909 the Royal Navy established Scotland's only Royal Naval Dockyard at nearby Rosyth. Post-war housing began in the late 1940s with the construction of temporary prefabs and Swedish timber houses around areas such as Kingseat and Townhill. Additional provisions were made for electricity, water and sewage systems. Council housing was focused towards Abbeyview, on a site on Aberdour Road; Touch, to the south of Garvock Hill; Bellyeoman and Baldridgeburn. Private housing became focused to the north of Garvock Hill and on the site of West Pitcorthie Farm.
Today, Dunfermline is the main centre for the West Fife area, and is also considered to be a dormitory town for Edinburgh. The town has shopping facilities, a major public park, a main college campus at Halbeath and an-out-of-town leisure park with a multiplex cinema and a number of restaurants. The online retailer Amazon.com has opened a major distribution centre in the Duloch Park area of Dunfermline.