Kerry won the Democratic Party presidential nomination in 2004, alongside vice presidential nominee and North Carolina Senator John Edwards. Kerry campaigned as a critic of Republican President George W. Bush's prosecution of the Iraq War and advocated a liberal domestic policy. Kerry lost the Electoral College and the popular vote by narrow margins, winning 251 electors to Bush's 286 and 48.3% of the popular vote to Bush's 50.7%. Kerry remained in the Senate and chaired the Committee on Foreign Relations from 2009 to 2013. In January 2013, he was nominated by President Barack Obama to succeed outgoing Secretary of State Hillary Clinton, and was confirmed by his Senate colleagues on a vote of 94–3. As Secretary of State, Kerry initiated the 2013–2014 Israeli–Palestinian peace talks and negotiated landmark agreements restricting the nuclear program of Iran, including the 2013 Joint Plan of Action and the 2015 Joint Comprehensive Plan of Action. In 2015, Kerry signed the Paris Agreement on climate change on behalf of the United States. Kerry served as Secretary of State until the end of the Obama administration in January 2017, when he left government service. Kerry remained active in public affairs as a vocal opponent of Obama's successor, Donald Trump, president from 2017 to 2021, and as a supporter of Trump's successor, Kerry's former U.S. Senate colleague Joe Biden, who had served as Obama's Vice President. Kerry returned to government in January 2021, becoming the first person to hold a new position, U.S. Special Presidential Envoy for Climate, in Biden's administration.