John Sidney McCain III (August 29, 1936 – August 25, 2018) was an American politician and naval officer who served as a United States Senator from Arizona from 1987 until his death. He previously served two terms in the United States House of Representatives and was the Republican nominee for President of the United States in the 2008 election, which he lost to Barack Obama. McCain graduated from the United States Naval Academy in 1958 and followed his father and grandfather—both four-star admirals—into the U.S. Navy.