After the Battle of Buxar in 1764, the company acquired the rights of administration in Bengal from de jure Mughal Emperor Shah Alam II; this marked the beginning of its formal rule, which within the next century engulfed most of India.