Mahadaji Shinde. The emperor became a client of the Maratha whose Peshwa demanded tribute, which the Moguls are known to have paid so as to avoid any further conflict with the Confederacy. In the year 1787, an embassy of Vijay Singh from Jodhpur presented itself to the Mughal Emperor Shah Alam II, bringing homage and the golden key of the Fortress of Ajmer. After killing Ghulam Qadir and restoring Shah Alam II to the throne, a Maratha garrison permanently occupied Delhi in 1788 and ruled on north India for next two decades until they were usurped by the East India Company in the Second Anglo-Maratha War. Reformation of the Mughal Army One of his first acts was to strengthen and raise a new Mughal Army, under the command of Mirza Najaf Khan. This new army consisted of infantrymen who successfully utilised both Flintlocks and Talwars in combat formations, they used elephants for transportation and were less dependent on artillery and cavalry. Mirza Najaf Khan is also known to have introduced the more-effective Firelock muskets through his collaboration with Mir Qasim, the Nawab of Bengal. Foreign relations Shah Alam II, was well supported by Jean Law de Lauriston and 200 Frenchmen during his campaign to regain the Eastern Subahs (during the Seven Years' War). The brainchild of the campaign was Ghulam Husain Tabatabai, who had gained much administrative and military experience from both the French and the Dutch. After Shah Alam II's defeat in the Battle of Buxar, the French once again reached out to emperor under Pierre André de Suffren in the year 1781, who initiated a plan to capture Bombay and Surat from the Maratha Confederacy and the British, with the co-operation of Mirza Najaf Khan, this action would eventually lead to Asaf Jah II to join Shah Alam II and the French and assist Hyder Ali to capture Madras from the East India Company. The internal conflicts within the Mughal imperial court would not allow the emperor to make such a bold move against the British. Jat victories Jats rose in retaliation of religious intolerance pursued by Aurangzeb. The Jat kingdom of Bharatpur waged many wars against the Mughal Delhi and in the 17th and 18th century carried out numerous campaigns in Mughal territories including Agra. Mughals were defeated by Marathas in 1757; and Mughal possessions and territories were under the annexation of the Jats led by Suraj