The success of the Qing dynasty in maintaining the old order proved a liability when the empire was confronted with growing challenges from seafaring Western powers. The centuries of peace and self-satisfaction dating back to Ming times had encouraged little change in the attitudes of the ruling elite. The imperial Neo-Confucian scholars accepted as axiomatic the cultural superiority of Chinese civilization and the position of the empire at the hub of their perceived world. To question this assumption, to suggest innovation, or to promote the adoption of foreign ideas was viewed as tantamount to heresy. Imperial purges dealt severely with those who deviated from orthodoxy.

By the nineteenth century, China was experiencing growing internal pressures of economic origin. By the start of the century, there were over 300 million Chinese, but there was no industry or trade of sufficient scope to absorb the surplus labor. Moreover, the scarcity of land led to widespread rural discontent and a breakdown in law and order. The weakening through corruption of the bureaucratic and military systems and mounting urban pauperism also contributed to these disturbances. Localized revolts erupted in various parts of the empire in the early nineteenth century. Secret societies, such as the White Lotus sect () in the north and the Triad Society () in the south, gained ground, combining anti-Manchu subversion with banditry.The Western Powers Arrive
As elsewhere in Asia, in China the Portuguese were the pioneers, establishing a foothold at Macao ( or Aomen in pinyin), from which they monopolized foreign trade at the Chinese port of Guangzhou ( or Canton). Soon the Spanish arrived, followed by the British and the French.
Trade between China and the West was carried on in the guise of tribute: foreigners were obliged to follow the elaborate, centuries-old ritual imposed on envoys from China's tributary states. There was no conception at the imperial court that the Europeans would expect or deserve to be treated as cultural or political equals. The sole exception was Russia, the most powerful inland neighbor.

The Manchus were sensitive to the need for security along the northern land frontier and therefore were prepared to be realistic in dealing with Russia. The Treaty of Nerchinsk (1689) with the Russians, drafted to bring to an end a series of border incidents and to establish a border between Siberia and Manchuria (northeast China) along the Heilong Jiang ( or Amur River), was China's first bilateral agreement with a European power. In 1727 the Treaty of Kiakhta delimited the remainder of the eastern portion of the Sino-Russian border. Western diplomatic efforts to expand trade on equal terms were rebuffed, the official Chinese assumption being that the empire was not in need of foreign--and thus inferior--products. Despite this attitude, trade flourished, even though after 1760 all foreign trade was confined to Guangzhou, where the foreign traders had to limit their dealings to a dozen officially licensed Chinese merchant firms.

Trade was not the sole basis of contact with the West. Since the thirteenth century, Roman Catholic missionaries had been attempting to establish their church in China. Although by 1800 only a few hundred thousand Chinese had been converted, the missionaries--mostly Jesuits--contributed greatly to Chinese knowledge in such fields as cannon casting, calendar making, geography, mathematics, cartography, music, art, and architecture. The Jesuits were especially adept at fitting Christianity into a Chinese framework and were condemned by a papal decision in 1704 for having tolerated the continuance of Confucian ancestor rites among Christian converts. The papal decision quickly weakened the Christian movement, which it proscribed as heterodox and disloyal.