In 1910, however, Japan annexed Korea by force, and ruled for 36 years until its defeat at the end of the second world war in 1945. At that point Japan suddenly withdrew from Korea, and Korea was divided into two halves: the north governed by the Soviet Union and the south by the US. Accordingly, two governments were established, and the northern government invaded the south in 1950.