<P> The Korean War (in South Korean Hangul: 한국 전쟁; Hanja: 韓國 戰爭; RR: Hanguk Jeonjaeng, "Korean War"; in North Korean Chosŏn'gŭl: 조국 해방 전쟁; Hancha: 祖國 解放 戰爭; MR: Choguk haebang chǒnjaeng, "Fatherland: Liberation War"; 25 June 1950--27 July 1953) was a war between North Korea (with the support of China and the Soviet Union) and South Korea (with the principal support of the United States). The war began on 25 June 1950 when North Korea invaded South Korea following a series of clashes along the border . The United Nations, with the United States as the principal force, came to the aid of South Korea . China came to the aid of North Korea, and the Soviet Union also gave some assistance to the North . </P> <P> As a product of the Cold War between the Soviet Union and the United States, Korea was split into two regions with separate governments . Both claimed to be the legitimate government of all of Korea, and neither accepted the border as permanent . The conflict escalated into open warfare when North Korean forces--supported by the Soviet Union and China--moved into the south on 25 June 1950 . The United Nations Security Council authorized the formation and dispatch of UN forces to Korea to repel what was recognized as a North Korean invasion . Twenty - one countries of the United Nations eventually contributed to the UN force, with the United States providing around 90% of the military personnel . </P> <P> After the first two months of war, South Korean and U.S. forces rapidly dispatched to Korea were on the point of defeat, forced back to a small area in the south known as the Pusan Perimeter . In September 1950, an amphibious UN counter-offensive was launched at Incheon, and cut off many North Korean troops . Those who escaped envelopment and capture were forced back north . UN forces rapidly approached the Yalu River--the border with China--but in October 1950, mass Chinese forces crossed the Yalu and entered the war . The surprise Chinese intervention triggered a retreat of UN forces which continued until mid-1951 . </P> <P> After these reversals of fortune, which saw Seoul change hands four times, the last two years of fighting became a war of attrition, with the front line close to the 38th parallel . The war in the air, however, was never a stalemate . North Korea was subject to a massive bombing campaign . Jet fighters confronted each other in air - to - air combat for the first time in history, and Soviet pilots covertly flew in defense of their communist allies . </P>

Who was winning the korean war before china entered the conflict
find me the text answering this question