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 the Qing and Great Britain, was triggered by the dynasty's campaign against the British merchants who sold opium to Chinese merchants. 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, and territory to the Europeans.
The wars and the subsequently-imposed treaties weakened the Qing dynasty and Chinese governments, 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.