Dunedin is the second-largest city in the South Island of New Zealand, and the principal city of the Otago region. Its name comes from Dùn Èideann, the Scottish Gaelic name for Edinburgh, the capital of Scotland. While Tauranga, Napier-Hastings and Hamilton have eclipsed the city in size of population since the 1980s to make it only the seventh-largest urban area in New Zealand, Dunedin is still considered one of the four main cities of New Zealand for historic, cultural and geographic reasons.
The urban area lies on the central-eastern coast of Otago, surrounding the head of Otago Harbour. The harbour and hills around Dunedin represent the remnants of an extinct volcano. The city suburbs extend out into the surrounding valleys and hills, onto the isthmus of the Otago Peninsula, and along the shores of the Otago Harbour and the Pacific Ocean. Dunedin was the largest New Zealand city by territorial land area until superseded by Auckland on the creation of the Auckland Council in November 2010.
Archaeological evidence points to the area having been long inhabited by Māori prior to the European arrival. The province of Otago takes its name from the Ngai Tahu village of Otakou at the mouth of the harbour, that became a whaling station in the 1830s.
In 1848 a Scottish settlement was established by the Lay Association of the Free Church of Scotland. Between 1855 and 1900 many thousands of Scots emigrated to the incorporated city. Dunedin became wealthy during the central Otago Gold Rush, beginning in the 1860s. In the mid-1860s, and between 1878 and 1881, it was New Zealand's largest urban area. The city population at 5 March 2013 was 120,246.
Dunedin has a diverse economy, which includes manufacturing, publishing and technology-based industries as well as education, research and tourism. The city's most important activity centres around tertiary education – Dunedin is home to the University of Otago, New Zealand's oldest university (established 1869), and the Otago Polytechnic. Students account for a large proportion of the population; 21.6 percent of the city's population was aged between 15 and 24 at the 2006 census, compared to the New Zealand average of 14.2 percent. In 2014 Dunedin was designated as a UNESCO City of Literature.