In 1737the marathas invaded,sacked delhi and overran much of northern india before returning to the Deccan
In 1723 Nizam ul mulk left delhi to govern the Deccan and soon declared independence.His descendent ruled Hyderabad until 1948
Aurangzeb strict policy towards non muslims however justified angered the people who formed the large majority of the population.This encouraged Hindus nationalism and rebellion
In 1761 the mughal emperor asked marathas to help fight the Afghans in the north west. The Marathas were defeated at panipat, and both sides were so weaken b this constent warfare that the maratha empir brokre up as well.
Aurangzeb,s great empire collapsed very suddenly after his death, although the mughal empire lasted in theory until the middle of the 19th centuray, after 1707 it had little real power, and after 1772, none at all. Historions still dispute how much aurangzeb himself contributed to the collapse and how much was due to events beyond his controll. but the fact is that a vast empire which in 1707 covered almost the whole subcontinent was by the end of the centuary little more than the region of delhi itself
in 1739 Nadir shah of Persia captured Peshawar and Lahore he also sacked Delhi taking the famous Peacock Throne of the mughals with him to Persia
The treasury was almost empty: earlier extravagance by the court and continious militry campaigns had drained the treasury at a faster rate than it could be replenished by taxes.