The Marathas gained power as the Mughal Empire declined, controlling large portions of the country.