John F Kennedy was born in Brookline, Massachusetts, a son of Joseph P Kennedy. He graduated from Harvard in 1940 and the same year published Why England Slept, a bestselling analysis of Great Britain's unpreparedness for war. He served as a torpedo boat commander in the Pacific during World War II and was decorated for his courageous conduct when the boat was hit and sunk.
Elected to the US House of Representatives as a Democrat from Massachussetts in 1946, he won a Senate seat in 1952 and the next year married Jacqueline Lee Bouvier (see Jackie Kennedy Onassis). While convalescing from spinal operations he wrote Profiles in Courage (1956), which won a Pulitzer Prize. Though he failed in his effort to gain the Democratic vice-presidential nomination in 1956, he won his party's presidential nomination in 1960, defeating Republican Richard Nixon by a narrow margin in the popular vote and becoming the first Catholic and, at the age of 43, the youngest person to be elected President. He introduced a legislative programme, the 'New Frontier', which aimed to extend civil rights and to provide funding for education, medical care for the elderly and the space programme, but much of it stalled in Congress. Through his brother Robert F Kennedy he supported federal desegregation policy in schools and universities.
He faced a series of foreign policy crises, including the unsuccessful invasion of Fidel Castro's Cuba at the Bay of Pigs (April 1961), the building of the Berlin Wall (August 1961) and the Cuban Missile Crisis (October 1962). At the risk of nuclear war, he induced the Soviet Union to withdraw its missiles from Cuba, and he achieved a partial nuclear test ban treaty with the USSR in 1963. He also founded the Peace Corps and increased the US military involvement in Vietnam.
On 22 November 1963, he was assassinated by rifle fire while being driven in an open car through Dallas, Texas. The alleged assassin, Lee Harvey Oswald, was himself shot and killed at point-blank range by Jack Ruby two days later. Kennedy's eloquent idealism and youthful glamour had won him much popularity in the USA and abroad, and though the legislative achievements of his brief administration were modest, his martyrdom enabled his successor, Lyndon B Johnson, to promote the social reforms of the 'Great Society' as his legacy.