At that time the only other Europeans engaged in trade with India were the Portuguese who had been there for over a hundred years. In the subsequent decades the Dutch, French and Danes also built trading posts. The competition was fierce and led to military battles between the Europeans as well as with native Indian armies. A key victory over the Portuguese at Swally in 1612 provided the EIC with the favour of the Mughal emperor who ruled over most of the subcontinent. Perhaps realizing the futility of waging trade wars in remote seas, the EIC persuaded the Mughal emperor to agree to a commercial treaty which gave them exclusive rights to reside and build factories throughout India. In return, the EIC was to provide the emperor with goods and rarities from the European market.
The major EIC factories became the walled forts of Fort William in Bengal, Fort St George in Madras and the Bombay Castle. In 1634, the Mughal emperor extended his hospitality to the English traders to the region of Bengal and in 1717 completely waived customs duties for the trade. In effect the EIC governed many parts of India as the nominal agent for the Mughal emporor.
Over the years fortunes were made in the trade but corruption was rampant. Because of this, the British government assumed partial control over the governance of India in 1737 with passage of the Regulating Act. The Act provided for a Governor General and a Council who served five-year terms to rule over Fort William in Bengal with successors to be elected by the East India Company's Court of Directors.
Although the treaty with the Mughal emporors provided great advantages for the EIC, it did not prevent the wars between the various powers being waged in India as well. A crucial battle of the Seven Years' War (1756 ‚ 1763) was the defeat of the French forces in India by Robert Clive, the Governor General, who led the Company forces to an astounding victory against the French forces at Plassey in 1757 which ended French imperial ambitions in the subcontinent.
Although originally the Governor General had direct control only over Fort William, he supervised other British EIC officials in India. Complete authority over all of British India was granted in 1833, and the official became known as the Governor-General of India. Following the wide-scale mutiny in 1857 of Indian Sepoy troops, the EIC was abolished in 1858 and India came under the direct control of the British Crown with the Governor General appointed by the Sovereign on the advice of the British government.