Tony Blair could not have hoped for a more upbeat end to his party conference.

By inviting Nelson Mandela to give the final speech of the week, he knew his troops would be sent off with new fire in the bellies, inspired by one of the great political heroes of the century.

And, after a conference that has seen Mr Blair grappling his way back to credibility after a disastrous few weeks - and which even witnessed a shock outbreak of Old Labourism over pensions - Mr Mandela did not disappoint.

His speech echoed with the sort of sentiment that was once the staple of Labour conferences but has recently seemed out of place in the New Labour party. And the delegates relished every second of it.

For the prime minister, it brought to a close what was without doubt his most difficult conference.

Before the Brighton meeting he had plummeted from being the most popular prime minister in living memory to a man fighting for his future.

He desperately needed to re-launch himself in Brighton and put his party back on track for an historic second general election victory.

Career saving

Chancellor Gordon Brown started the fightback with a showstopping speech in which he demanded a national debate about tax and spend priorities.

The prime minister then rose to the occasion the following day with what, in retrospect, may well be seen as a career saving speech.

He expressed regret over previous mistakes and came close to contrition over disasters such as the millennium dome.

In a performance which was a mixture of inspiration and plenty of perspiration, he pledged to listen to voters' concerns over issues like pensions and the fuel crisis.

With sweat pouring off him, he managed to draw a line under the crisis which has been gripping his government recently, and raise delegates' sights to the looming general election.

Only a day later, of course, he suffered a significant defeat over pensions after a rebellion by union leaders which recalled the old days of Labour.

Despite his "I'm listening" pledge, Mr Blair immediately insisted he would not abide by the decision and would not restore the link between the basic state pension and average earnings.

It was a setback he could have done without and which may yet come back to trouble him.

Stopped the rot

But, with the conference at an end, the widespread verdict was that he had done enough to stop the rot.

The opinion polls started suggesting he had perhaps ended the Tory lead and that, once the party conference season was over, he would find himself back in front - albeit with a more realistic lead than in previous months.

Like all recent Labour conferences, it was inconceivable this one would not end with something spectacular.

Deputy prime minister John Prescott put on his best stand-up comic coat to deliver one of his now famous knockabouts, riddled with jokes about William Hague being the Burger King of politics - every day another whopper - and so on.

And soul singer Gabrielle delivered her hit song which includes the line about dreams coming true.

Ability to unite

And then there was Nelson Mandela.

There were some concerns that the party was attempting to use him as a way of adding credibility to Tony Blair's government.

But Mr Mandela did not fall into that trap - real or imagined.

His praise was concentrated onto the Labour party, rather than "new" Labour or Tony Blair.

And he successfully used the appearance to address a far wider global audience about the Aids crisis and world-wide capitalism.

Mr Mandela's ability to unite is legendary - and Tony Blair must have left the conference hoping some of it had rubbed off on him.