Following the end of Ahmad Shah Durrani's fourth invasion and his departure from the Indian subcontinent, three lead figures in the north: Adina Beg Khan, who led the remnants of the Mughal Empire in Punjab; Jassa Singh Ahluwalia, the supreme leader of the Sikh misls; and the Maratha leader Raghunath Rao with an army from the south, joined hands for the reconquest of North India then held by the Afghan Durrani Empire and its ally, the Kingdom of Rohilkhand.

The recapture started with the invasion of Agra and Delhi in May 1757 and advanced through the Punjab, overwhelming the outnumbered Afghan forces led by Timur Shah Abdali and Jahan Khan, eventually ending in their expulsion from the Punjab in April 1758.

The coalition victory was short-lived, however, with Ahmad Shah returning in his fifth invasion of India, which saw the Punjab annexed by the Durranis and the Marathas decisively defeated at the Third Battle of Panipat.

Background

Ahmad Shah Durrani launched his fourth invasion of India in November 1756. Advancing from Afghanistan, his forces moved through Punjab, where they encountered resistance. The Afghan army reached Delhi on 28 January 1757, sacking the city and extracting substantial tribute from the Mughal court of Emperor Alamgir II. Durrani's campaign involved widespread plunder and the imposition of heavy taxation on local populace by plundering the cities of Mathura in February and Gokul and Agra in March. He withdrew toward Afghanistan in April 1757, leaving garrisons under his son Timur Khan and his commander-in-chief Jahan Khan to administer the conquered territories.

During the invasion and its immediate aftermath, regional powers faced direct pressures. In Sindh, the newly appointed Ghulam Shah Kalhoro lost local support as Afghan influence favoured his brother Attar Khan, contributing to Ghulam Shah's expulsion and subsequent exile on 7 November 1757. The Khanate of Kalat under Mir Nasir Khan I initially remained loyal to Durrani but later renounced his overlordship for greater autonomy.

In Punjab, Adina Beg Khan, the governor of the Jalandhar Doab, initially accommodated Afghan demands but grew restive as Jahan Khan pressed for more obedience and greater tribute. Adina Beg began recruiting local allies, including Sikh forces under Jassa Singh Ahluwalia, to counter Afghan detachments. Meanwhile, the Maratha Empire, having already expanded its influence in southern and central India, responded to the power vacuum in the north.

Conquest of the Ganges–Yamuna Doab March from Indore to Jaipur The Treaty of Kannauj (23 April 1752) proclaimed the Mughal Empire as a protectorate of the Maratha Empire and thus in a state of an invasion was compelled to be protected by the latter. On this pretext, Peshwa Nana Saheb I sent his brother Raghunath Rao, accompanied by commanders like Malhar Rao Holkar to Delhi. The Maratha army, initially numbering 16,000, comprising cavalry and infantry along with artillery and supply trains, left Pune, the seat of the Peshwa, in October 1756 after celebrating Diwali and reached Indore on 14 February 1757.

Two key factors prevented an immediate direct march on Delhi: Ahmad Shah Durrani was still operating in the region with a large force, and the Maratha army itself was critically short on resources, money, and manpower after the long campaign. Raghunath Rao repeatedly wrote to the Peshwa in Pune, requesting reinforcements and funds, but little assistance was forthcoming as the Maratha capital faced its own severe debts. Calling Ahmad Shah "strong" and "difficult to chastise", Raghunath Rao demanded Dattaji Scindia from the Deccan for his aid. Rao's Diwan wrote to Pune;

In one of his letters to the Peshwa, Rao wrote;

To address these shortages, Raghunath Rao resorted to raiding neighbouring Rajput territories. In March 1757, his forces extracted a ransom of Rs. 100,000 from Jawad and Rani Khera. In April, they laid siege to Chauth ka Barwara, a stronghold under Maharaja Madho Singh I of Jaipur. By the 12th of April, Raghunath demanded Rs. 400,000 to 500,000 in cash along with the jagir of Ranthambore, Rampura-Bhanpura, Tonk-Toda, and Hinglajgarh (valued at around Rs. 1,400,000). Madho Singh rejected what he considered a humiliating demand and assembled his feudatories by 10 May. At this point, Raghunath had detached approximately 20,000 men under Sakharam Bapu Bokil, Vitthal Vinchurkar, Gangadhar Tatya, Antaji Mankeshwar, and an elite huzurat force toward Agra, leaving himself with only about 13,000 troops against Madho Singh's 17,000.

On 10 July, the two sides reached an agreement. Madho Singh paid Rs. 1,100,000, of which Rs. 600,000 were paid immediately (Rs. 400,000 to Raghunath Rao and Rs. 200,000 to Malhar Rao). This settlement provided much-needed funds and allowed Raghunath Rao to resume the advance.

Sakhuram Bapu in the Doab The vanguard led by Naro Shankar coming from Jhansi and Sakharam Bapu coming from Jaipur reached Agra in May, where they extracted dues from Maharaja Suraj Mal of Bharatpur. On 10 June, Raghunath wrote to Najib ad-Dawlah, the Paymaster-General of Delhi, for the payment of the customary chauth but was declined boldly. Upon hearing the arrival of Sakharam in Kasganj after crossing the Yamuna River on 17 June, numerous allies of Najib, including Nawab Ahmad Khan Bangash of Farrukhabad, fled his stronghold along with the agents of Delhi. Sakharam thus took Ganges–Yamuna Doab without any major confrontation with Antaji taking Anupshahar and Sikandrabad on 2 July and the heavily-guarded Meerut on 15 July. Najib's cousin and his Bakhshi, who led 3,000 men at Meerut and 1,000 at Hapur, were defeated thrice.

The lawlessness in the Doab region led to multiple Gurjar and Rajput landlords to encroach and occupy neighbouring towns and villages. Two thousands of such mud-forts, reported by Maratha agents, required a "full-sized army and exhaustless gun-munition." Grand Vizier Imad-ul-Mulk, who had originally called the Maratha for help against Najib, had kept the Diwan Nagar Mal at Anupshahar to form an alliance with the Marathas. At the end of July, Najib sent his brother Afzal Khan and captain Mulla Aman Khan with artillery across the Yamuna to secure the Doab tract but was forced to call them back after four or five days on seeing the Maratha conquest of Doab complete.

Siege of Delhi

On 7 June, the Maratha ambassador to Delhi, Bapu Mahadev Hingane, who had fled to Kumher, was called back to Delhi by Imad-ul-Mulk. He received him well and gave him the title Maharajadhiraj (Great King of Kings) on 15 June. Sakharam Bapu and Tatya Gangadhar took post in Patparganj in around 15 July, and Shamsher Bahadur encamped in Rewari on 27 July. Prince Ali Jah (the second son of Alamgir II) was invited to Rewari by Shamsher but was treacherously arrested on 30 July. He also imposed levy on Nawab Kamgar Khan Baloch of Farrukhnagar.

The arrival of the Maratha from all front had shook the Afghans who saw the plundering of the grains from the opposite bank of the Yamuna.

Najib had dug trenches in Khizrabad to bar an invasion but was unsuccessful and concentrated all his forces in the new city. On 21 July, he placed 2,500 men in the Delhi fort under Afzal Khan and Mulla Aman Khan. The artillery was planted below the fort under the walls of Kalani Bagh. Najib sent his agent Meghraj to Imad and Sakhuram on 4 August, proposing terms, but the latter refused and demanded the evacuation of Najib and his forces from the fort. The first skirmish happened at the site of Okhla between the patrols sent by Najib and the foragers of Bapu Hingane on 6 August.

First Phase Raghunath and Malhar left the Jaipur State at the end of July, crossing Kharwa and Najafgarh Lake on 7 August and reaching Khizrabad just south of Delhi city on 11 August. Joined by Sakhuram and Shamsher, Raghunath divided his army into two divisions. The force sent to Old Fort entered through the Kabuli Gate, slew Bakhtawar Khan, the Qiladar, and resorted to plunder. Narsinghdas Kayath's son bolstered by 200 men of Karam Khan fought the Maratha troops until they were overcome by sheer number and forced to retreat.

The other force attacked the south-east of the city near the garden of Javid Khan. To oppose it, Najib sent the experienced general Mian Qutb Shah with 2,500 Rohilla warriors. Qutb fired at the Marathas from the Blue Bastion instead of meeting them head on. At around 3 p.m., Qutb stopped firing and retired by the permission of Najib to sack the mansion of Imad-ul-Mulk so that he could avenge the death of his men. The "infuriated" Rohillas found the mansion closed shut from inside but barged in through the thatched sheds. Qutb, easily fending off 600 men guarding the mansion, plundered it and dishonoured its inhabitants—ladies and servants—.

Finally, an Afghan noble, Saif-ud-Din Muhammad Khan Kashmiri, with permission from Najib, moved the ladies from the mansion to the vacant house of Diwan Nagar Mal. Imad, cutting all ties with Najib, crossed the eastern side of the city, and joined the Maratha camp in the evening. The next day, the Maratha force approached the river bank again but were fired by Najib's men through the Blue Bastion. The Maratha force retreated at about 3 p.m. ceasing operations for a few days.

Maratha light horse unit under Malhar was sent towards Naraina and Sarai Khwaja Basant in the west of the city. Najib closed all the gates and stationed artillery at each of them. He filled the Tripolia Gates with stones and mud, leaving only a small pathway for traffic and trade. "The grain supply of the city was entirely stopped, and there was a great scarcity of food and consequent suffering. Wheat sold at six seers to a Rupee."

Malhar Rao along with Vitthal Vinchurkar, Bahadur Khan Baloch, and Jamil-ud-Din Khan made ground opposite the Kashmiri Gate while sending Manaji Paygude to entrench opposite the Kabuli Gate where he recruited 4,000 Turk musketeer mercenaries near the suburb of Mughalpura. The main Maratha camp shifted near the Eidgah, which stationed the Imperial Artillery Arsenal (Jinsi Topkhana).

Second Phase On 25 August, two hours before dawn, the Maratha force accompanied by Bahadur Khan and Nagar Mal entered Qudsia Bagh, planted their guns, and started attacking the Rohillas stationed at the mansions of Jafar Khan and Ali Mardan Khan. The Rohillas retreated inside the walls, and the Qudsia Bagh and Begum Bagh were captured. Bahadur Khan encamped at the garden of Jafar Khan, and Malhar drew closer to the Kashmir Gate. Najib carried his heavy artillery to the northern side and started to fire at the Marathas during the night of 25th and 26th, leaving seven hundred men of Bahadur Khan dead.

Najib, who at that time was left with less than 2,000 men, suspended fight and advocated for peace multiple times to Malhar by sending his agent Meghraj. Malhar's agent, Mujiram Bania, demanded that Najib resign from his post as Mir Bakhshi in favour of Ahmad Khan Bangash, forfeit from the fort to his own jagirs and pay Rs. 5,000,000 to 6,000,000 in indemnity. Najib proposed that he'll pay Rs. 500,000 instead and only accede to these demands if the same is expected from Imad. Criticising the cowardice of Alamgir II, Najib intercepted his letters to Imad and continued negotiating with Malhar.

On the night of the 29th and 30th, renewed attacks began when the Marathas opened fire on all sides of the city. In the south, two bastions of the Delhi Gate were destroyed by Raghunath, while Lahore Gate, in the north-west, was attacked by Imad and extended to the Hayat Bakhsh Bagh, Diwan-i-Khas, Diwan-i-Am, and Toshakhana. Najib's Rohillas retaliated the next day by driving away Imad's men from the Lahore Gate and Bangash from Eidgah; looting tobacco and timber en masse. They then encountered Imad's men in the Turkman Gate, where they killed his Diwan Dilel Singh and captured his banner.

Najib ad-Dawlah's Surrender