Dunedin (dʌˈniːdᵻn ; Ōtepoti) is the second-largest city in the South Island of New Zealand (after Christchurch), 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. The city has a rich Māori, Scottish, and Chinese heritage.
With an estimated population of as of , Dunedin is both New Zealand's seventh-most populous metro and urban area. For historic, cultural and geographic reasons, the city has long been considered one of New Zealand's four main centres. The urban area of Dunedin lies on the central-eastern coast of Otago, surrounding the head of Otago Harbour, and the harbour and hills around Dunedin are 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.
Archaeological evidence points to lengthy occupation of the area by Māori prior to the arrival of Europeans. The province and region of Otago takes its name from the Ngāi Tahu village of Otakou at the mouth of the harbour, which became a whaling station in the 1830s.
In 1848 a Scottish settlement was established by the Lay Association of the Free Church of Scotland and between 1855 and 1900 many thousands of Scots emigrated to the incorporated city. Dunedin's population and wealth boomed during the 1860s Central Otago Gold Rush, and for a brief period of time it became New Zealand's largest urban area. The city saw substantial migration from mainland China at the same time, predominately from Guangdong and Guangxi. Dunedin is home to New Zealand’s oldest Chinese community.
Today Dunedin has a diverse economy which includes manufacturing, publishing, arts, tourism and technology-based industries. The mainstay of the city's economy remains centred around tertiary education, with students from the University of Otago, New Zealand's oldest university, and the Otago Polytechnic, accounting for a large proportion of the population; 21.