The best known phrase associated with the British Empire from the middle of the nineteenth century until the early twentieth was that "the sun never set" over its dominions. That was, quite literally, true. Roughly 25% of the surface of the globe was directly or indirectly controlled by the British in the aftermath of World War I (1918). Enormous bureaucracies of "natives" worked under white British officials everywhere from the South Pacific to North Africa. The ultimate expression of British imperialism was in India, where just under 100,000 British officials governed a population of some 300,000,000 Indians.

Until 1857, India was governed the British East India Company (the EIC), the state-sponsored monopoly established in the seventeenth century to profit from overseas trade and which controlled a monopoly on Indian imports and exports. Through a long, slow creep of territorial expansion and one-sided treaties with Indian princes, the EIC governed almost all of the Indian subcontinent by 1840. India produced huge quantities of precious commodities, including cotton, spices, and narcotics. In fact, the EIC was the single largest drug cartel in world history, with the explicit approval of the British government. Most of those narcotics consisted of opium exported to China.

By the 1830s, 40% of the total value of Indian exports took the form of opium, which led to the outbreak of the first major war between a European power, namely Britain, and the Chinese Empire. In 1840, Chinese officials tried to stop the ongoing shipments of opium from India and open war broke out between the EIC, supported by the British navy, and China. A single British gunboat, the Nemesis, arrived after inconclusive fighting had gone on for five months. In short order, the Nemesis began an ongoing rout of the Chinese forces. The Chinese navy and imperial fortresses were nearly helpless before gunboats with cannons, and steamships were able to penetrate Chinese rivers and the Chinese Grand Canal, often towing sailing vessels with full cannon batteries behind them.