Both the Americans and the Soviet Union invaded Japanese-controlled Korea as WW2 was coming to an end
As a result, Korea was divided between north and south at the 38th parallel, the line of latitude where the division was drawn
So, from the outset, America was closely involved with South Korea
To the north of the boundary, North Korea was controlled by a communist government backed by the Soviet Union; to the south, it was controlled by a more democratic government backed by America
But it was intended only to be a temporary division, elections supervised by the UN would lead to the country being united again
But when the elections were held, the UN was not allowed in to North Korea to supervise them and so only the elections in the South counted and Korea divided into two states
On June 25th, 1950, Kim Il Sung, the North Korean leader, attacked the South; America felt it had to lead the response
Mao had just won the civil war in China and Communists were also fighting in Vietnam, Malaya and Indonesia
For America, this was another test (like the Berlin blockade) and America had to apply its policy of containment
Not to do so would weaken its standing across Asia
If South Korea fell to the Communists, China would be encouraged to seize Formosa (Taiwan) and if that fell, Japan could be threatened
If this happened, it would represent a major shift in the balance of power