When the trade-related opium wars ended in 1862, China not only ceded some territory to Europe and the US but also lost control of its trade and economic policies by signing several unequal treaties. Over the years since, China has learned its lessons well and taken steps to protect itself.