During the Russo-Japanese War of 1904-1905, a naval engagement, the Battle of Korsakov, took place off the town in August 1904. In 1905, Japan conquered Sakhalin in the late stages of the war, and southern Sakhalina, including Korsakovsky, was handed over to Japan in 1905 after Russia's defeat in the war. The Russians burned the wooden town before the hand-over. Upon the ashes of Fort Korsakovsky the Japanese built a stone-clad modern city with paved streets and electricity, renaming it "Ōtomari" (大泊), a translation of the Ainu words "Poro-an-tomari" (big harbor). The town was temporarily the capital of Karafuto Prefecture between 1905 and 1907. While in Japanese hands the town grew substantially. A penal colony under Russia's administration, Ōtomari maintained the practice of forced labor: the Japanese brought thousands of ethnic Koreans to Ōtomari as workers. Korsakov's present-day Korean population is descended mainly from those labor conscripts.