What country split Korea into North Korea and South Korea?

The country was split by the United Nations after WWII (mainly by the Soviet Union and the United States). It was held by Japan during WWII and after the UN split the country into two. The north being held by Soviet troops and south By US troops. By 1948 nether country could agree on how to make it one country and in the end the north turned to communism and the south to a more democratic government. In 1950 the Korean war started when North Korea invaded South Korea.