quality:correction, quality:corruption, information:classification, information:highlighting, structural:reformatting
British, Russian, and Japanese occupations

The British briefly occupied Qingniwa during the Second Opium War in 1858, but returned it to Chinese (Qing) control in 1860. Port Arthur at the tip of the Liaodong Peninsula took its English name from Royal Navy Lieutenant William Arthur, though the area's Chinese name had always been Lüshun. Although China heavily fortified the area, in which it allowed trade with foreigners, in the First Sino-Japanese War Japan swiftly overcame those defenses on 21 November 1894 in the Battle of Lüshunkou, committing the Port Arthur massacre afterwards. In April 1895 China conceded defeat in the First Sino-Japanese War, ceding Liaodong Peninsula, Taiwan and Penghu, and making many other concessions in the Treaty of Shimonoseki (17 April 1895).

In the Triple Intervention of 23 April 1895, Russia, France and Germany forced Japan to return the Liaodong Peninsula to China, despite the treaty's terms; instead the Russian Empire coerced a lease of the peninsula from the Qing dynasty in 1898. Russia had a particular interest in the region of the peninsula as one of the few areas in the region that had the potential to develop ice-free ports. The Russians built a modern commercial port city, which they wanted to become the Paris of the Far East, and called it Dal'niy (Russian: Дальний). Linked by 1902 with the Trans-Siberian Railway via the branch line Chinese Eastern Railway through Harbin, Dal'niy became Russia's primary port-city in Asia while also serving Western traders. Russia signed the Pavlov Agreement (1898) with China, which granted Russia a 25-year lease on Dalian and Lüshun and exclusive right to build a branch of the Chinese Eastern Railway—what would become from 1905 the Japanese-operated South Manchurian Railway. Russia spent more than 10 million golden rubles (equivalent to 11.5 billion of today's rubles) building the new ice-free port city.

Russia heavily fortified both Dalniy (Qingniwaqiao of Zhongshan District) and the Port Arthur naval base (Lüshunkou) before and after the Boxer Rebellion of 1899–1901. During the insurrection, missionaries and converts were killed by rebels in the peninsula, although the massive massacres of ethnic Chinese Christians including Metrophanes, Chi Sung occurred at Harbin. Western expeditionary forces suppressed the Boxers across the Yellow Sea in Shandong.

During the Russo-Japanese War of 1904–1905, the Liaodong Peninsula became a major battleground. Major-General Baron Anatoly Stoessel defended a besieged Port Arthur, for five months (August 1904 to January 1905), but the Japanese army, using long-distance fire, sank several Russian ships at the Port Arthur naval base in early December 1904. Admiral Eugene Alexeyeff was blamed for splitting precious resources shipped 8,000 km (5,000 mi) across the single tracked Trans-Siberian Railway and Manchurian Railway between Dalniy and Port Arthur. After the Imperial Japanese Navy crippled the remaining Russian battleship Sevastopol in three weeks of constant attacks, and explosives detonated in tunnels destroyed Port Arthur's remaining defenses in the final days of 1904, Russia negotiated a ceasefire and surrendered Port Arthur in January 1905.

The Treaty of Portsmouth (signed 5 September 1905) ceded Port Arthur to Japan, which set up the Kwantung Leased Territory or Guandongzhou (關東州), on roughly the southern half (Jinzhou District and south) of present-day Dalian. Japanese invested heavily in the region, which became the main trading port between Manchuria and Japan. Japan leased the area from Manchukuo after establishing that puppet state in 1932. In 1937, as the Second Sino-Japanese War began, Japan enlarged and modernized the trade zone as two cities: the northern Dairen (Dalian) and the southern Ryojun (Lüshun or Port Arthur).