including the limited industrialization that accompanied them. After defeat by the Japanese in 1894, the movement became discredited. In 1911, the Xinhai Revolution overthrew the Manchus and established the Republic of China. The attendant era of warlords and civil war accelerated the decline of the Chinese economy, whose percentage of the world gross domestic product rapidly fell, although at the time Europe and United States also went through Industrial and Technological Revolution that jumped up their share. European impact After defeating China in two wars, Great Britain secured treaties that created special rights for it and for other imperialist powers including France and Germany, as well as the United States and Japan. They took control of a number of "treaty ports," especially Shanghai. The primary goal was trade, but the port cities had a major long-term impact on the Chinese economy, society, and culture. Above all Shanghai became the dominant urban center. Tianjin, and Shenyang followed; Hong Kong, although a British colony not a treaty port was similar. Foreigners were welcomed and had stable safe bases, as did Christian missionaries. Outside the ports the only foreigners were occasional Christian missionaries, and they often encountered serious difficulties. The other 89 cities that became treaty ports between 1842 and 1914 were of minor importance. In stark contrast to the dramatic rapid modernisation of Japan in the late 19th century, China's Manchu leaders followed a conservative path. China's communications with the outside world were dramatically transformed in 1871 when the Great Northern telegraphic company opened cables linking Shanghai to Hong Kong, Singapore, Nagasaki, and Vladivostok, with connections to India and Europe. The first telegraph inside China, however, was a short line between Shanghai and Tianjin that opened in 1881. China's first modern commercial treaty with Japan was signed on the basis of equality in 1871. As part of its diplomatic opening China established legations in Tokyo, London, Berlin, Washington, Madrid, and St Petersburg in 1877–1880. Everyone carried optimistic expectations of highly profitable trade with China's hundreds of millions of consumers. It did not happen. By 1890 the total value of all Chinese imports and exports to the outer world was only £50 million, less than many smaller countries. Europe made its own porcelain and silk; China grew its own opium. The only major new product was kerosene (for lamps) brought in by the American company Standard Oil. China was too poor, too self-sufficient,