This is a timeline of events relating to the final years of Tony Blair's tenure as Leader of the Labour Party and prime minister and the leadership elections to find replacements for him and Deputy Prime Minister John Prescott, from his announcement that he would not lead Labour into a fourth general election, concluding with Gordon Brown becoming prime minister.

Initial signals that Tony Blair's leadership was to end

On 30 September 2004, Tony Blair said he would not seek a fourth term as Prime Minister. Labour went on to win a third consecutive term at the 2005 general election with a significantly decreased majority of 66 seats; with Blair pledging to serve another full term. The Labour Party and Blair himself subsequently experienced a surge in popularity at the time of terrorist bombings of London in July 2005, but by the Spring of 2006, were facing significant difficulties; most notably with scandals over failures by the Home Office to deport illegal immigrants and national campaigns by many political parties and think-tanks saying that the United Kingdom was being overrun by immigrants. Worries over the potential increase of support for the far-right British National Party during the 2006 local election campaign saw many Labour backbenchers and activists begin to demand a timetable from Blair for his departure, with many suggesting that it should be sooner rather than later.

Speculation over the timing of Blair's resignation had been amplified by a variety of politicians and newspapers making their predictions. On 21 April, The Guardian reported that the Brown camp were working on the assumption that Blair would announce the candidacy open on 9 May 2007, the day after power-sharing was due to start in Northern Ireland, following which the new Labour Party leader would be elected on 15 July 2007. Talk of David Miliband, Alan Milburn, Charles Clarke or John Reid as possible candidates was almost constant, although the former consistently denied any ambition to stand and the latter three refused to make a decision until there was a vacancy, ultimately declining in the week before Blair requested the NEC to find a successor.

Demands for Blair to announce a resignation timetable

On 15 July 2006, John McDonnell became the first Labour MP to announce an intention to stand for the leadership when Blair resigned. On 5 September 2006, 17 Labour MPs signed a letter asking Blair to resign, accompanied by press reports alleging that up to 80 MPs were willing to sign. Later, senior party members stated that Tony Blair would not be prime minister at the next Labour Party conference and on 6 September, Tom Watson, one of the MPs who signed the letter, resigned as Junior Defence Minister along with seven Parliamentary Private Secretaries: Khalid Mahmood, Wayne David, Ian Lucas, Mark Tami, Chris Mole, David Wright and Iain Wright.

On 7 September, Jack Straw stated that he expected the Prime Minister to announce a timetable for his departure in May 2007 and Blair announced that the September 2006 Labour Party Conference and TUC Conference would be the last he would attend as party leader, despite which he was heckled at the Trades Union Congress on 12 September by members calling for him to resign immediately.

On 23 September, John Hutton became the first serving Cabinet Minister to say that Gordon Brown should face a serious challenger for Labour's leadership. At the 2006 Labour Party Conference on 25 September, Brown announced his candidacy for the leadership, while three days later at the same conference John Prescott announced that he would stand down when Blair resigned as prime minister. During the debate on The Queen's Speech on 15 November, Blair said Conservative leader David Cameron was a "flyweight against a heavyweight" at the next general election, widely interpreted as implicit support for Brown.

Campaigning commences In January 2007, Brown outlined a number of his potential policies for Britain, mentioning citizen responsibility, education, efforts to solve problems in Africa and "a new style of politics" as his priorities. On 17 January, he spoke of "a new world order" while on a tour of India, and announced backing for India's bid for a place as a permanent member on the UN Security Council, and on many other international bodies. On 21 March, at 12:30 pm, he delivered the budget for the 2007–08 financial year, his last budget as Chancellor of the Exchequer. On 16 January, Blair declared his intention to attend a summit of EU leaders as prime minister on 21–22 June 2007, and on 28 January stated that he was "not finished yet", and intended to complete the public sector reforms he had started, as well as leading Labour into local and devolved Elections on 3 May.

On 17 January, left-wing MP John McDonnell claimed that support for his leadership challenge had grown to within striking distance of the necessary backing. Michael Meacher, former Minister of State for the Environment in the DETR and its successor Defra announced that he was also seeking nominations from MPs and was considering standing. On 22 February he became the third Labour MP to announce his intention to stand for the leadership, although critics in the media expressed doubt over the extent of backbench support for either challenger at this point.

On 2 March, Jack Straw casually declined to run for the leadership after reports that someone had placed a £500 bet on his winning. On 20 March, the Labour Party NEC met to decide on rules for the upcoming leadership elections. On 13 April, Brown met US President George W. Bush for the first time, in a reportedly amicable discussion. On 15 April he encouraged rivals to "bring it on", in response to numerous reports suggesting that he would face three or four contenders for the leadership.

On 17 April, David Miliband declared that he would not be a candidate for the Labour leadership or Deputy leadership, and had not wavered in his position on that issue in the past three years. He subsequently announced his support for Brown in any leadership election. On 20 April, The Independent reported that many of Blair's closest allies were eager to unite the Blair and Brown camps and prevent any challenge to Gordon Brown from dividing the party. The next day, The Guardian reported that 217 MPs had already signed up to back Gordon Brown's leadership. There were also reports that even among the undecided, many were keen to prevent the progress of Michael Meacher and John McDonnell.

On 27 April, Michael Meacher and John McDonnell agreed that whichever had fewer supporters the day after Blair resigned as Labour leader would step aside, to allow the other a stronger chance to secure the support of the 45 MPs necessary to qualify for the ballot paper. On 1 May, Blair announced that he would announce his resignation as Labour leader the following week, following which he expected a campaign of about seven weeks. He also announced his support for Brown to succeed him as Labour leader and prime minister. On 3 May, the day after Blair and Brown's tenth anniversary as prime minister and Chancellor of the Exchequer, elections were held for English and Scottish Local Government, the Scottish Parliament and the Welsh Assembly. Labour faced mixed results, making gains in some areas, with slightly higher support than the previous year in the Local Elections and fairly minimal losses in the devolved elections, remaining the largest party in Wales and having one less seat than the SNP in Scotland, while losing many English council seats, mainly to the Conservative Party.

On 3 May, Charles Clarke changed his position towards Brown, praising him publicly and denying that he was poised to challenge for the Labour leadership. In an interview with The Times the following day, he claimed that he could get a sufficient number of nominations to stand for the Labour leadership, but that the Labour Party did not "have the appetite" for such a contest. John Reid and John Hutton also announced their support for Brown, Reid going on to announce that he would be stepping down as Home Secretary upon the departure of Blair and Prescott.

On 9 May, in the last Prime Minister's Questions before Blair announced the vacancy for the Labour leadership, David Cameron described the Labour government as "like The Living Dead". Blair ignored Cameron's taunts regarding the possible chaos caused by interim arrangements for the election of a new Labour leader and the upcoming resignation of John Reid from the government.

Blair asks Labour NEC to seek a new leader On 10 May, Blair announced to the Sedgefield Labour Party that he would stand down as prime minister on 27 June 2007, and that he would be requesting Labour's NEC to seek a new party leader. Shortly afterwards, John Prescott announced that he would stand down as deputy prime minister on the same day and that he had written to the NEC to announce his resignation as party Deputy Leader. Labour's NEC met on 13 May to finalise a timetable for the handover, confirming that Blair would remain leader until a new leader was elected, and giving any potential candidates three active Parliament days in which to submit their papers. Brown, Michael Meacher and John McDonnell held a joint policy debate in London.

On 10 May, John McDonnell and Michael Meacher delayed a decision over which one should run, describing their respective levels of support as "too close to call". Interviewed by Red Pepper, John McDonnell stated that he could and would not support Michael Meacher, since he had voted with New Labour on many issues, and that it was a matter of them sitting down together to compare how many votes they had and decide a way forward. On 14 May Michael Meacher declared that he would not be a candidate in the Labour leadership election, since he did not have enough MPs support to get onto the ballot paper, going on to say he would be backing John McDonnell to get a left-wing candidate onto the ballot paper, though the possibility of this was still in doubt.

On 10 May, Peter Hain (Secretary of State for Northern Ireland) and Harriet Harman (Solicitor General) both announced that they had more than the minimum necessary number of nominations to appear on the Ballot paper for the Deputy Leadership Election, claiming 47 and 44 nominations respectively.

Leadership elections

As nominations opened on 15 May 2007, it became clear that Brown was well past the minimum requirement of nominations, with the support of around 282 MPs, while John McDonnell had only 27 nominations; still well short of the 45 required. In the Deputy Leadership Race, Harriet Harman, Hazel Blears, Peter Hain and Alan Johnson all had more than the minimum required nominations, with Jon Cruddas having 44 nominations and Hilary Benn 34. On 16 May, John McDonnell alleged that many of Brown's supporters were using wrecking tactics to ensure that the decision did not proceed to a ballot. Later that day, Brown secured 308 nominations, to John McDonnell's 29; although nominations were to be open for another day there were insufficient undeclared MPs remaining for anyone except Gordon Brown to be on the ballot, meaning he need only attend hustings and wait to be declared leader by the NEC. At this stage, John McDonnell conceded defeat. In the Deputy Leadership Race, Jon Cruddas and Hilary Benn secured the required nominations. Nominations closed on 17 May, with Brown having secured 313 nominations compared to John McDonnell's 29. Harriet Harman (65 nominations), Hazel Blears (49 nominations), Peter Hain (51 nominations), Alan Johnson (73 nominations), Jon Cruddas (49 nominations) and Hilary Benn (47 nominations) all qualified to appear on the Deputy leadership ballot.