The first steam locomotive in China is thought to be a 2'6" gauge 0-4-0T engine used on the Shanghai-Wusong railway. Towards the end of the 19th century concessions obtained from the Qing dynasty enabled foreign powers (Germany, Russia, France and Great Britain) to build railways in China, and they introduced a variety of foreign-built machines. Later Japan gained control over Manchuria as a result of the Treaty of Portsmouth following the Russo-Japanese War and created the South Manchuria Railway from their acquisitions - resulting in Japanese as well as American locomotives being imported into the north-east of China.
After the end of the Second World War China came back under indigenous rule. Locomotive were imported from both the United States and Russia as well as other Communist bloc countries.
Production of steam locomotives continued into the late 20th century. However, steam motive power was supplanted by diesel and electric locomotives as early as the 1950s. The Chinese rail network has been increasingly electrified in the twentieth century.