From 1524 to 1752, Lahore was part of the Mughal Empire. Lahore touched the zenith of its glory during the Mughal rule from 1524 to 1752. The Mughals, who were famous as builders, gave Lahore some of its finest architectural monuments, many of which are extant today. From 1524 to 1752, Lahore was part of the Mughal Empire. Lahore grew under emperorBabur; from 1584 to 1598, under the emperors Akbar the Great and Jahangir, the city served as the empire's capital. Lahore reached the peak of its architectural glory during the rule of the Mughals, many of whose buildings and gardens have survived the ravages of time. Lahore's reputation for beauty fascinated the English poetJohn Milton, who wrote "Agra and Lahore, the Seat of the Great Mughal" in 1670. During this time, the massive Lahore Fort was built. A few buildings within the fort were added by Akbar's son, Mughal emperor Jahangir, who is buried in the city. Jahangir's son, Shahjahan Burki, was born in Lahore. He, like his father, extended the Lahore Fort and built many other structures in the city, including the Shalimar Gardens. The last of the great Mughals, Aurangzeb, who ruled from 1658 to 1707, built the city's most famous monuments, the Badshahi Masjid and the Alamgiri Gate next to the Lahore Fort. During the 18th century, as Mughal power dwindled, Lahore was often invaded, and government authority was lacking. The great Punjabi poetBaba Waris Shah said of the situation, "khada peeta wahy da, baqi Ahmad Shahy da" — "we have nothing with us except what we eat and wear, all other things are for Ahmad Shah". Ahmad Shah Durrani captured remnants of the Mughal Empire and had consolidated control over the Punjab and Kashmir regions by 1761. The 1740s were years of chaos, and the city had nine different governors between 1745 and 1756. Invasions and chaos in local government allowed bands of warring Sikhs to gain control in some areas. The Sikhs were gaining momentum at an enormous rate. In 1801, the twelve Sikh misls joined into one to form a new empire and sovereign Sikh state ruled by Maharaja Ranjit Singh.