The Mughal Empire had been in decline since the death of the last Mughal Emperor Aurengzeb in 1707. The decline was accelerated by the invasion of India by Nadir Shah in 1739. Continued rebellions by the Marathas in the south, and the de-facto separation of a number of states (including Hyderabad and Bengal), weakened the state further. Within a few years of Aurangzeb's death, the Marathas had reversed all his territorial gains in the Deccan, and had conquered almost all Mughal territory in central and north India. In 1761, they wanted to expand further north and north west, where their path crossed Ahmad Shah Abdali — the ruler of Afghanistan, who had been making raids into Punjab for several years. The battle at Panipat did not end Martha rule but only halted their expansion into North India.
And what a great patriot you are to be proud of the success of an Afghan invader!!!!!!!!!!