The Mughals took the fort in 1698, but Rajaram had already escaped to Maharashtra.
01Three hills, one fort
Gingee is built over three rocky hills, Rajagiri, Krishnagiri and Chandrayandurg, joined by walls. Shivaji had taken it in 1677 on his southern campaign. After Sambhaji’s death Rajaram made his way there in disguise and set up his court. Zulfiqar Khan invested the fort in 1690, but the siege dragged on for years. Maratha armies under Santaji and Dhanaji came to its relief, and Mughal officers were said to be in no hurry to end it.
02The escape
Late in 1697 Rajaram slipped out of Gingee and reached Vishalgad in Maharashtra. The fort fell to the Mughals in January 1698. By then the war had moved back north, and the Marathas had a king among them again.

Jinji kept the Maratha state alive in its darkest decade by giving its king a refuge the Mughals could not reach.
