At the end of World War II, Korea regained its independence after 35 years of imperialist Japanese rule. Per the Yalta Conference agreements, Soviet forces accepted surrender of Japanese forces in northern Korea above the 38th parallel, and U.S. forces south of that line. Korea was then divided into Soviet (North Korean) and U.S. (South Korean) spheres. South Korea refused diplomatic and trade relations with Japan, using tensions with Japan to rally support for the South Korean government. The early ROK (Republic of Korea; South Korea) government derived its legitimacy from its opposition to Japan and North Korea, portraying South Korea as under threat from the North and South. The diplomatic relationship between Japan and South Korea was established in 1965, when the Treaty on Basic Relations was signed; Japan subsequently recognized the Republic of Korea (the official name of South Korea) as the only legitimate government on the Korean Peninsula. As such, North Korea does not have official diplomatic ties with Japan.