Nancy is the prefecture of the northeastern French department of Meurthe-et-Moselle. It was the capital of the Duchy of Lorraine, which was annexed by France under King Louis XV in 1766 and replaced by a province, with Nancy maintained as capital. Following its rise to prominence in the Age of Enlightenment, it was nicknamed the "capital of Eastern France" in the late 19th century. The metropolitan area of Nancy had a population of 511,257 inhabitants at the 2018 census, making it the 16th-largest functional urban area in France and Lorraine's largest. The population of the city of Nancy proper is 104,885.