In 1904 Russia led Nicholas II got permission from the Qing dynasty to build the Trans-Siberian railway to extend the Railway into Qing Dynasty China and Korea however the Empire of Japan led by Emperor Meiji saw this as a threat and the Japanese declared war on Russia and won the war in 1905. In 1914 Russia declared war on Austria-Hungary and Germany since the they made with the France. In 1917, World War I caused the bad conditions for workers in factories to become even worse with a food shortage. People blamed it on the Tsar and rebelled against his government. There were riots in cities such as St Petersburg and Moscow. The Tsar was soon forced to abdicate in the February Revolution in 1917. After the October Revolution he was assassinated with his family during the Russian Civil War. In 1922 most of the Russian Empire became the Union of Soviet Socialist Republics, or USSR when a communist government won the Russian Civil War. Some counties in the Empire escaped, but the biggest ones were forced into the USSR.