The first Russo-Japanese agreement to deal with the status of Sakhalin and the Kuril Islands was the 1855 Treaty of Shimoda which first established official relations between Russia and Japan. Article 2 of the Treaty of Shimoda, which provided for an agreement on borders, states "Henceforth the boundary between the two nations shall lie between the islands of Etorofu and Uruppu. The whole of Etorofu shall belong to Japan; and the Kuril Islands, lying to the north of and including Uruppu, shall belong to Russia." The islands of Kunashiri, Shikotan and the Habomai Islands, that all lie to the south of Etorofu, are not explicitly mentioned in the treaty and were understood at the time to be a non-disputed part of Japan. The treaty also specified that the island of Sakhalin/Karafuto was not to be partitioned but was to remain under a joint Russo-Japanese condominium.[7]
In a subsequent 1875 Treaty of Saint Petersburg Russia and Japan agreed that Japan would give up all rights to Sakhalin in exchange for Russia giving up all rights to the Kuril Islands in favor of Japan.
The Russo-Japanese war of 1904-1905 was a military disaster for Russia.[8][9] The 1905 Treaty of Portsmouth, concluded at the end of this war, gave the southern half of Sakhalin Island to Japan.
Although Japan occupied parts of Russia's Far East during the Russian Civil War following the October Revolution, Japan did not formally annex any of these territories and they were vacated by Japan by the mid-1920s.
There was practically no hostile activity between the USSR and Japan after the Battle of Khalkin Gol ended the Japanese-Soviet Border Wars in 1939 and before the USSR declared war on Japan (Manchurian Strategic Offensive Operation) on August 8, 1945. The Soviet–Japanese Neutrality Pact was signed in Moscow on April 13, 1941 but was unilaterally renounced by the Soviet Union in 1945. On August 14, 1945 Japan accepted the Potsdam Declaration and on the following day announced unconditional capitulation. The Soviet operation to occupy the Kuril Islands took place between August 18 and September 3. Japanese inhabitants were repatriated two years later