The Maratha Empire or the Maratha Confederacy was a power that dominated a large portion of the Indian subcontinent in the 18th century. The empire formally existed from 1674 with the coronation of Chhatrapati Shivaji and ended in 1818 with the defeat of Peshwa Bajirao II. The Marathas are credited to a large extent for ending Mughal rule in India.
The Maratha were a warrior group from the western Deccan Plateau (present-day Maharashtra) who rose to prominence by establishing a Hindavi Swarajya (meaning "self-rule of Hindu/Indian people"). The Maratha became prominent in the 17th century under the leadership of Shivaji, who revolted against the Adil Shahi dynasty, and carved out a kingdom with Raigad as his capital. Known for their mobility, the Maratha were able to consolidate their territory during the Mughal-Maratha Wars and later controlled a large part of the Indian subcontinent.
After the death of Aurangzeb in 1707, Chhattrapati Shahu, grandson of Shivaji, was released by the Mughals. Following a brief struggle with his aunt Tarabai, Shahu became the ruler and appointed Balaji Vishwanath and later, his descendants, as the peshwas or prime ministers of the empire. Balaji and his descendants played a key role in the expansion of Maratha rule. The empire at its peak stretched from Tamil Nadu in the south, to Peshawar (modern-day Khyber Pakhtunkhwa, Pakistan) in the north, and Bengal Subah in the east. The Maratha discussed abolishing the Mughal throne and placing Vishwasrao Peshwa on the Mughal imperial throne in Delhi but were not able to do so. In 1761, the Maratha Army lost the Third Battle of Panipat against Ahmad Shah Abdali of the Afghan Durrani Empire, which halted their imperial expansion into Afghanistan. Ten years after Panipat, the young Peshwa Madhavrao I's Maratha Resurrection reinstated Maratha authority over North India.
In a bid to effectively manage the large empire, Madhavrao gave semi-autonomy to the strongest of the knights, and created a confederacy of Maratha states. These leaders became known as the Gaekwads of Baroda, the Holkars of Indore and Malwa, the Scindias of Gwalior and Ujjain, the Bhonsales of Nagpur, the Mehere's of Vidharbha and the Puars of Dhar and Dewas. In 1775, the East India Company intervened in a Peshwa family succession struggle in Pune, which led to the First Anglo-Maratha War. The Maratha were victorious.
The Maratha remained the pre-eminent power in India until their defeat in the Second and Third Anglo-Maratha Wars (1805 - 1818), which resulted in the East India Company controlling most of India.