Makhachkala, previously known as Petrovskoye (1844–1857) and Port-Petrovsk (1857–1921), or by the local Kumyk name of Anji, is the capital and largest city of Dagestan, Russia. The city is located on the Caspian Sea, covering an area of 468.13 square kilometres (180.75 square miles), with a population of over 623,254 residents, while the urban agglomeration covers over 3,712 square kilometres (1,433 square miles), with a population of roughly 1 million residents. Makhachkala is the fourth-largest city in the Caucasus, the largest city in the North Caucasus and the North Caucasian Federal District, as well as the third-largest city on the Caspian Sea, after Baku and Rasht. The city is extremely ethnically diverse, with a minor ethnic Russian population.
The city's historic predecessor is the port town of Anji (Andzhi), which was located in Kumykia, and which was a part of the possessions of the Tarki state, the capital of Kumyks known from the 8th century.