Shah Alam II, based on the Treaty of Allahabad signed in August 12, 1765, granted Diwani rights or right to administer the territory and collect taxes to the British East India Company.
This treaty was signed following the defeat of the allied forces of Mir Qasim, Shah Alam II, and Shuja-ud-daula, the Nawab of Awadh in the Battle of Buxar in 1764. The victorious British secured the whole revenue of Bengal as a result of the granting of Diwani.