The United States got involved in the Vietnam conflict to keep communism from spreading throughout Southeast Asia. At first the United States only aided France with military aid and advisors, but after the French suffered a major defeat at Dien Bien Phu in the north-western hills, the French pulled out and the United States took over the burden of the war.
Although, after the Second World War the worldwide trend was to free colonies and make them independent countries, the United States decided to aid France in its effort to keep its colony of Indochina because it needed France's help to stabilize Europe in the initial stages of the cold war. In 1954, the same year as the French pullout from Vietnam, delegates at the Geneva Conference partitioned Vietnam at the 17th parallel. The arrangement was supposed to be temporary, but in 1955 after rigged elections, the prime minister of South Vietnam declared it to be an independent state called the Republic of Vietnam.
Devised by the Eisenhower administration, the domino theory stipulated that if one country succumbed to communism, the surrounding countries inevitably would fall as well. For this reason, the United States greatly increased its aid to the Republic of Vietnam. At first, American personnel consisted only of non-combatant advisors. In 1959, U.S. military advisors received permission to fire back if the enemy fired upon them. During the Kennedy administration, the United States continued to increase the amount of military aid and advisors. However, it was not until after the Gulf of Tonkin incident in 1964, when the North Vietnamese fired upon U.S. ships, that President Johnson ordered U.S. ground troops into Vietnam.