"I've been prime minister of this country for just over 10 years," Blair said in his televised speech.
"In this job, in the world of today, I think that's long enough for me but more especially for the country. Sometimes the only way you conquer the pull of power is to set it down."
"Actually I've been very lucky and very blessed and this country is a blessed nation.
"The British are special. The world knows it. In our innermost thoughts we know it. This is the greatest nation on earth. So it has been an honour to serve it.
"I give my thanks to you, the British people, for the times that I've succeeded and my apologies to you for the times I've fallen short. But good luck."
Blair, a close ally of George Bush, the US president, has lost favour with voters for sending British forces to join the 2003 invasion of Iraq.
Referring to the war in Iraq, Jeremy Greenstock, the former British ambassador to the UN, said: "If Tony Blair made any mistakes of judgement it was about the degree to which he was being dragged into something he couldn't control.
A Labour party revolt in September last year forced him to say he would resign within a year.
"Tony Blair's legacy is nothing but the Iraq war"
Politics, Cambridge, UK
Send us your views
Blair will be remembered for helping bring peace to Northern Ireland after years of violence, winning three straight elections for Labour for the first time by moving the left-wing party more into the centre of British politics.
An opinion poll published by The Guardian newspaper on Thursday showed that 60 per cent of voters believed Blair would be remembered as a force for change, although that change was not always seen as good.
The ICM poll said 44 per cent believed he had been good for Britain.
'A good prime minister'
Paddy Ashdown, former leader of the Liberal Democrat party, said: "It's very easy to be critical at this stage. He did the whole 10 years in a round. Britain has been for most of those years - not now, because of Iraq - more respected on the [international] stage, more envied by other economies, especially the European ones.
"I think he has raised the level of wealth and prosperity of many in Britain, although the gap between the rich and the poor has widdened.
"He has presided over changes in the coinstitution which has altered the way the country is governed.
"So I guess overall, a good prime minister."
Blair has been expected to hand over power before the end of his third term to let someone else take the party into the next national election, expected in 2009.
Brown, the finance minister, whose official residence is next door to Blair's in London's Downing Street, has waited with increasing impatience for the departure of his neighbour.
Critics say their rivalry, often bitter, has diluted the government's effectiveness.