Throughout the disintegration of the Mughal Empire, the armies of Jaipur were in a constant state of warfare. Towards the end of the 18th century, the Jats of Bharatpur and the Kachwaha chief of Alwar declared themselves independent from Jaipur and each annexed the eastern portion of Jaipur's territory. This period of Jaipur's history is characterised by internal power-struggles and constant military conflicts with the Marathas, Jats, other Rajput states, as well as the British and the Pindaris. Jaipur suffered against the Rathors of Marwar in the Battle of Gangwana with appalling losses. The kingdom again suffered a disastrous defeat at the hands of the Maratha forces of Mahadji Scindia in the Battle of Patan in 1790, forcing the rulers of Jaipur to pay heavy tributes. Nevertheless, enough wealth remained in Jaipur for the patronage of fine temples/palaces, continuity of its courtly traditions and the well-being of its citizens and merchant communities. Jaipurs last attempt to gain freedom from Gwalior ended in a defeat at the Battle of Malpura. A treaty was initially made by Maharaja Sawai Jagat Singh and the British under Governor General Marquis Wellesley in 1803, however the treaty was dissolved shortly afterwards by Wellesley's successor, Lord Cornwallis. In this event, Jaipur's Ambassador to Lord Lake observed that "This was the first time, since the English government was established in India, that it had been known to make its faith subservient to its convenience".