colonial era in South Asia. British policy in Asia during the 19th century was chiefly concerned with expanding and protecting its hold on India, viewed as its most important colony and the key to the rest of Asia. The East India Company drove the expansion of the British Empire in Asia. The company's army had first joined forces with the Royal Navy during the Seven Years' War, and the two continued to cooperate in arenas outside India: against the French campaign in Egypt and Syria, the capture of Java from the Netherlands in 1811, the acquisition of Singapore in 1819 and Malacca in 1824, and the First Anglo-Burmese War in 1826. From its base in India, the company was also engaged in an increasingly profitable opium trade to China, which had begun in the 1730s. This trade helped reverse the trade imbalances resulting from British imports of tea, which saw large outflows of silver from Britain to China. The Chinese authorities banned the importation of opium, and in 1839, 20,000 chests of opium were confiscated and destroyed in Canton by Lin Zexu. This led to the First Opium War, which was concluded in the Treaty of Nanjing, re-legalizing the importation of opium into China. The British had direct or indirect control over all parts of present-day India before the middle of the 19th century. In 1857, a local rebellion by a group of sepoys escalated into the Indian Rebellion of 1857, which took six months to suppress with heavy loss of life on both sides; with British casualties numbering in the thousands and Indian casualties numbering in the hundreds of thousands. The trigger for the rebellion has been a subject of dispute among historians. The rebellion, although short-lived, was triggered by attempts from the East India Company to expand its control in India. According to Olson, several reasons may have triggered the rebellion. For example, Olson concludes that the East India Company's attempt to annex and expand its direct control of India, by arbitrary laws such as Doctrine of Lapse, combined with discrimination in employment against Indians, contributed to the 1857 Rebellion. The East India Company officers lived lavish lives, the company finances were in shambles, and the company's effectiveness in India was examined by the British crown after 1858. As a result, the East India Company lost its powers of government and British India formally came under direct Crown