Kennedy was born into a wealthy political family in Brookline, Massachusetts. He graduated from Harvard University in 1940, before joining the U.S. Naval Reserve the following year. In the 1960 presidential election, he narrowly defeated Republican opponent Richard Nixon, who was the incumbent vice president. He served in the House for six years, joining the influential Education and Labor Committee and the Veterans' Affairs Committee.