The now capital of Rajasthan, Jaipur was built in 1727 AD by Maharaja Sawai Jai Singh II. It is from his name that the city extracts its name. Jaipur happens to be the first planned city of India. Maharaja Jai Singh, who was only 11 years old, came into power after the demise of his father Maharaja Bishan Singh. Kachwaha Rajputs, who came into power in 12th century, are said to be Jai Singh's ancestors. Their rivalry with Sisodia Rajputs, rulers of Mewar, helped them in their alliance with Mughals. Mughals too helped the Kachwaha Rajputs against Sisodia Rajputs, resulting in Kachwahas attaining a reputed place in Rajasthan. They ruled the kingdoms of Mewar (Udaipur) and Marwar (Jodhpur) from the glorious Amber Fort. Jai Singh supported Aurangzeb's son Azam Shah in the battle of succession, which created unrest among people. But Azam Shah lost this bid to throne to his brother Bahadur Shah.
Azam Shah then demanded the removal of Jai Singh from the throne. With the ally of Mughals, Jai Singh brought himself back to power. The kingdom flourished in his reign and Jai Singh built his capital around Amber Fort and Jaipur was eventually developed as India's first ever planned city by chief architect from Bengal, Vidhyadhar Bhattacharya. Vidhyadhar Bhattacharya, following the principles of Shilpa Shastra (the science of Indian architecture), and referencing the ancient Indian knowledge on astronomy, further developed and discussed the plan with Jai Singh. It is said that the foundation of the city was laid down on 18th November 1727 by Jai Singh himself. It took minutely plans strategies and 4 years for the city's major places—the roads, the square, palaces and the fortification of the boundaries—to come to form.
After the death of Jai Singh in 1744, his sons fought for power and without a king, the city became open to intrusion by neighbouring states. Rajputs and Marathas took over most of Jaipur. Later in 1876, Maharaja Ram Singh adorned the city in pink colour, which is supposed to be associated with hospitality, to welcome the Prince of Wales (later King Edward VII) to the city; and thus it acquired the name Pink City. Ramgarh Lake was also built by Maharaja Ram Singh to provide water to the budding and prospering city. In 1922, the throne was taken over by Man Singh II, and it was at that time, buildings like secretariat, schools, and hospitals were built. After India got independence, Jaipur merged with Jodhpur, Jaisalmer and Bikaner to form the largest state of India with Jaipur as its capital.