Karafuto Prefecture (, Karafuto-chō; ), commonly known as South Sakhalin, was a prefecture of Japan located in Sakhalin from 1907 to 1949. Karafuto became territory of the Empire of Japan in 1905 after the Russo-Japanese War when the portion of Sakhalin south of 50°N was ceded from the Russian Empire in the Treaty of Portsmouth. Karafuto was established in 1907 as an external territory until being upgraded to an "Inner Land" of the Japanese metropole in 1943. Ōtomari (Korsakov) was the capital of Karafuto from 1905 to 1908 and Toyohara (Yuzhno-Sakhalinsk) from 1908 to August 1945 when the Japanese administration ceased to function in the invasion of South Sakhalin by the Soviet Union after the surrender of Japan in World War II. Karafuto Prefecture was de facto replaced with Sakhalin Oblast, although it continued to exist de jure under Japanese law until it was formally abolished as a legal entity by Japan on 1 June 1949. Name The Japanese name Karafuto purportedly comes from Ainu () which means "the island a god has created on the estuary (of Amur River)". It was formerly known as Kita Ezo, meaning Northern Ezo (Ezo was the former name for Hokkaido). When the Japanese administered the prefecture, Karafuto usually meant Southern Sakhalin only. For convenience, the northern part of the island was sometimes called Sagaren. In Russian, the entire island was named Sakhalin or Saghalien. It is from Manchu sahaliyan ula angga hada, meaning "peak of the mouth of Amur River". The southern part was simply called Yuzhny Sakhalin ("South Sakhalin"). In Korean, the name is Sahallin or Hwataedo, with the latter name in use during Korea under Japanese rule. History Japanese settlement on Sakhalin dates to at least the Edo period. Ōtomari was established in 1679, and cartographers of the Matsumae domain mapped the island, and named it "Kita-Ezo". Japanese cartographer and explorer Mamiya Rinzō established that Sakhalin was an island through his discovery of what is now named Mamiya Strait (Strait of Tartary) in 1809. Japan unilaterally proclaimed sovereignty over the whole island in 1845. The 1855 Treaty of Shimoda acknowledged that both Russia and Japan had joint rights of occupation to Sakhalin, without setting a definite territorial demarcation. As the island became settled in the 1860s and 1870s, this ambiguity led to increasing friction between settlers. Attempts by the Tokugawa shogunate to purchase the entire island from the Russian Empire failed,