Hafiz Rahmat Khan was not disposed to agree to those terms, and while negotiations were proceeding for buying off the Marathas Zabita Khan escaped. Several desultory engagements now took place between the Marathas and the Afghan forces. Inayat khan was summoned by his father to Farrukhabad in order that he might be consulted regarding the surrendering of his jagirs. But although Dhunde Khan agreed to give up Shikohabad Inayat Khan refused to surrender Etawah. Ultimately, disgusted with his father's arrangements he returned to Bareilly, and his father on his own responsibility sent orders to Sheikh Kuber, the Rohilla governor of Etawah, to surrender the fort to the Marathas. The Marathas now marched to Etawah, but as the orders had not yet reached him Sheikh Kuber gave them battle. Several desperate assaults were made on the fort of Etawah which were all beaten off, but finally it was handed over to the Marathas in accordance with hafiz Rahmat Khan's orders, and the Rohillas quit the district, leaving it once more in the hands of the Marathas. Later in the same year, 1771 AD, the Marathas advanced to Delhi and reinstated the emperor Shah Alam, who had cast in his lot with them, on the throne. They were now masters of the empire and Zabita Khan determined to oppose them. Assembling his forces, he attacked the Marathas near Delhi but was signally defeated, and in 1772 the Marathas overran a large portion of Rohilkhand and captured Najafgarh, where Zabita Khan's family resided and his treasure lay. Under the Government of Oudh Zabita Khan then solicited the aid of Shuja-ud-daula, Nawab Wazir of Oudh; but the Nawab declined to interfere unless Hafiz Rahmat Khan applied on his behalf. Negotiations were commenced with Shah Alam and the Marathas for the restoration of Zabita Khan's family and the evacuation of Rohilkhand. The Marathas agreed to accept 40 lakhs of rupees, provided that Shuja-ud-daula made himself responsible for the payment; but Shuja-ud-daula now declined to enter into any such engagement unless Hafiz Rahmat Khan gave him a bond for the money. To this Hafiz Rahmat Khan consented, the bond was signed and the Marathas retired from Rohilkhand.