18th century saw a steady decline of once a dominant power on the whole subcontinent – Mughal Empire. Apart from the disastrous invasion by the Afsharid ruler of Iran, Nader Shah in 1739, Mughals were successfully contested by Maratha Empire. Meanwhile, the British East India Company was asserting its influence in India and was engaged in a series of wars with Mysore which eventually resulted in the region falling under Company rule.