Ultimately, the Third Anglo-Maratha War (1817–1818) resulted in the loss of Maratha independence. It left the British in control of most of the Indian subcontinent. The Peshwa was exiled to Bithoor (Marat, near Kanpur, Uttar Pradesh) as a pensioner of the British. The Maratha heartland of Desh, including Pune, came under direct British rule, with the exception of the states of Kolhapur and Satara, which retained local Maratha rulers (descendants of Shivaji and Sambhaji II ruled over Kolhapur). The Maratha-ruled states of Gwalior, Indore, and Nagpur all lost territory and came under subordinate alliances with the British Raj as princely states that retained internal sovereignty under British paramountcy. Other small princely states of Maratha knights were retained under the British Raj as well.