In the 1st century CE, the Romans organized two Caucasian campaigns and reached Baku.Near the city, in Gobustan, Roman inscriptions dating from 84–96 CE were discovered.According to the Lonely Planet's ranking, Baku is also among the world's top ten destinations for urban nightlife.
The Inner City of Baku, along with the Shirvanshah's Palace and Maiden Tower, were inscribed as a UNESCO World Heritage Site in 2000.
The fall of the Ak Koyunlu brought the city immediately into the sphere of the newly formed Iranian Safavid dynasty, led by king (shah) Ismail I (r. Ismail I laid siege to Baku in 1501 and captured it; he allowed the Shirvanshahs to remain in power, under Safavid suzerainty. 1524-1576), completely removed the Shirvanshahs from power, and made Baku a part of the Shirvan province.
Baku remained as an integral part of his empire and the successive Iranian dynasties to come for the next centuries, until the irrevocable cession in the first half of the 19th century.
The city walls of Baku were also rebuilt and strengthened.
By the early 16th century Baku's wealth and strategic position attracted the focus of its larger neighbors; in the previous two centuries, it was under the rule of the in Iran-centred Kara Koyunlu and Ak Koyunlu.
Between the 12th and 14th centuries, massive fortifications were undertaken in Baku and the surrounding towns.