After the Battle of Buxar in 1764, the Company acquired the civil rights of administration in Bengal from the Mughal Emperor Shah Alam II; it marked the beginning of its formal rule, which was to engulf eventually most of India and extinguish the Moghul rule and dynasty itself in less than a century.