Two expanding empires collided in northeast Asia. Russia, building the Trans-Siberian Railway, wanted an ice-free Pacific port. In 1898 it leased Port Arthur on the Liaodong Peninsula, the very territory it had forced Japan to hand back after the First Sino-Japanese War, and during the Boxer Rebellion it occupied Manchuria and then delayed leaving. Japan regarded Korea as essential to its security and offered a bargain: Russian primacy in Manchuria in exchange for Japanese primacy in Korea. Tsar Nicholas II and his advisers, contemptuous of Japanese strength, let the talks drift.
On the night of 8 February 1904 the Japanese navy attacked the Russian squadron at Port Arthur without a prior declaration of war. Japanese armies landed in Korea, crossed the Yalu, and besieged Port Arthur, which fell in January 1905 after months of trench fighting with heavy artillery and machine guns that foreshadowed World War I. A huge battle at Mukden in February and March pushed the Russians north. Russia's Baltic Fleet, sent halfway around the world, was annihilated by Admiral Togo in the Tsushima Strait on 27–28 May 1905.
Both sides were exhausted, Japan financially and Russia politically. The American president Theodore Roosevelt mediated the Treaty of Portsmouth, signed in New Hampshire on 5 September 1905. Russia recognized Japan's paramount interest in Korea, transferred its Liaodong lease and the southern Manchurian railway, and ceded the southern half of Sakhalin. Japan received no indemnity, which set off riots in Tokyo.
The consequences were far-reaching. In Russia, defeat discredited the autocracy and fed the Russian Revolution of 1905, which forced the tsar to concede a parliament. Japan was confirmed as a great power and proceeded to the Japanese Annexation of Korea in 1910. Across Asia and beyond, nationalists from India to Egypt, Persia, and the Ottoman lands took the outcome as proof that Europeans could be beaten and that constitutional, industrial modernization was the way to do it. The war also weakened Russia in the European balance, encouraging the Alliance System alignments that preceded 1914.