The Opium Wars were two wars waged between the Qing dynasty and Western powers in the mid-19th century. The First Opium War, fought in 1839–1842 between Qing China and Great Britain, was triggered by the dynasty's campaign against the British merchants who sold opium in China. The Second Opium War was fought between the Qing and Britain and France, 1856–1860. In each war, the European force's modern military technology led to easy victory over the Qing forces, with the consequence that the government was compelled to grant favorable tariffs, trade concessions, reparations and territory to the Europeans.
The wars and the subsequently-imposed treaties weakened the Qing dynasty and the Chinese imperial government, and forced China to open specified treaty ports that handled all trade with imperial powers. In addition, China gave the sovereignty over Hong Kong to Britain.
Around this time, China's economy also contracted slightly, but the sizable Taiping Rebellion and Dungan Revolt had a much larger effect.