Mir Qasim, who had replaced Mir Jafar earlier, had conflicts with the British East India Company and formed an alliance with the Nawab of Awadh (Shuja-ud-Daulah) and the Mughal Emperor (Shah Alam II). The British deposed Mir Qasim in July 1763 and reinstalled Mir Jafar as the Nawab of Bengal. The Battle of Buxar took place on October 22, 1764.