Tony Blair's term as the prime minister of the United Kingdom began on 2 May 1997 when he accepted an invitation of Queen Elizabeth II to form a government, succeeding John Major of the Conservative Party, and ended on 27 June 2007 upon his resignation. While serving as prime minister, Blair also served as the first lord of the treasury, minister for the civil service and leader of the Labour Party. He and Gordon Brown both extensively used the New Labour branding while in office, which was presented as the brand of a newly reformed party that had altered Clause IV and endorsed market economics. Blair is the second longest serving prime minister in modern history after Margaret Thatcher, and is the longest serving Labour politician to have held the office. Blair was appointed prime minister after Labour won the 1997 general election, its largest landslide victory in history. During his first term, Blair enacted constitutional reforms, and significantly increased public spending on healthcare and education, while also introducing controversial market-based reforms in these areas. In addition, Blair saw the introduction of a minimum wage, tuition fees for higher education, constitutional reform such as devolution in Scotland and Wales, an extensive expansion of LGBT+ rights and significant progress in the Northern Ireland peace process with the passing of the landmark Good Friday Agreement. On foreign policy, Blair oversaw British interventions in Kosovo in 1999 and Sierra Leone in 2000, which were generally perceived as successful. Blair was re-elected in a second landslide in 2001. Three months into his second term, Blair's premiership was shaped by the September 11 terrorist attacks in the United States, resulting in the start of the war on terror. Blair supported the foreign policy of the George W. Bush administration by ensuring that the British Armed Forces participated in the War in Afghanistan, to overthrow the Taliban, destroy al-Qaeda, and capture Osama bin Laden.