By the early 18th century, the Maratha Kingdom had transformed itself into the Maratha Empire under the rule of the Peshwas (prime ministers). In 1737, the Marathas defeated a Mughal army in their capital, Delhi itself in Battle of Delhi (1737). The Marathas continued their military campaigns against Mughals, Nizam, Nawab of Bengal and Durrani Empire to further extend their boundaries. Gordon explained how the Maratha systematically took control over new regions. They would start with annual raids, followed by collecting ransom from villages and towns while the declining Mughal Empire retained nominal control and finally taking over the region. He explained it with the example of Malwa region. Marathas built an efficient system of public administration known for its attention to detail. It succeeded in raising revenue in districts that recovered from years of raids, up to levels previously enjoyed by the Mughals. For example, the cornerstone of the Maratha rule in Malwa rested on the 60 or so local tax collectors who advanced the Maratha ruler Peshwa a portion of their district revenues at interest. By 1760, the domain of the Marathas stretched across practically the entire subcontinent. The north-western expansion of the Marathas was stopped after the Third Battle of Panipat (1761). However, the Maratha authority in the north was re-established within a decade under Peshwa Madhavrao I. The defeat of Marathas by British in third Anglo-Maratha Wars brought end to the empire by 1820. The last peshwa, Baji Rao II, was defeated by the British in the Third Anglo-Maratha War. With the defeat of the Marathas, no native power represented any significant threat for the British afterwards.