Ed Miliband launched a rallying cry against racism as he and other political leaders paid tribute to Nelson Mandela yesterday.

During a special session of the House of Commons the Labour leader warned that Mandela's legacy was not yet complete.

"It is in the spirit of what Nelson Mandela taught us, to acknowledge the truth about the past and without rancour to welcome the change that has come to pass," he told MPs.

"But also to honour his legacy by acknowledging that in every country, including our own, the battle against racial injustice still needs to be won."

His passionate call came in a lengthy session on which political wrongs, to quote Mandela himself, were forgiven but not forgotten.

So packed were the green benches with MPs wanting to pay their respects to the late South African President, the Speaker John Bercow allowed the session to last more than seven hours.

The only spaces conspicuously empty were those usually occupied by the DUP, with former SDLP leader Mark Durkan the only North Irish MP in the chamber.

Also there, an unusual sight these days, was Gordon Brown, who praised Mandela as the "man most responsible for the destruction of what people thought was indestructible, the apartheid system. The man who taught as that no injustice can last for ever".

In a moving and deeply personal speech, Mr Brown also spoke of a visit to South Africa which coincided with the death of Mr Mandela's son from Aids.

Despite his grief Mr Mandela had insisted on telling the waiting press that Aids was not to be treated as a moral judgment, but as a disease like the tuberculosis he himself had suffered from.

"His greatness was as vast as the continent he loved," Mr Brown said. "Showing there that his greatness was the greatness of the human soul."

He added: "We are mourning because as long as Mandela was alive you knew that even in the worst of disasters, amidst the most terrible of tragedies and conflict amidst the most evil that existed in the world, there was someone there standing between us and the elements that represented goodness and nobility.

"And we celebrate today, because the lessons that we have learned today will live on. He teaches us that indeed no injustice can last forever. And he teaches us that whenever good people of courage come together, there is infinite hope."

Earlier David Cameron had led the tributes praising the late political leader as a "towering figure" who "didn't see himself as a victim of history; he wrote it".

He had shown though his life that "progress was not just handed down as a gift - it is won through struggle", the Prime Minister added.

But this was no outbreak of political harmony.

There was outrage from some on the Labour benches as Tory MP Sir Malcolm Rifkind tried comparing Mandela's struggle with that of former South African leader FW De Klerk, who had battled to bring his own people with him as he agreed to hold free elections.

One Labour MP also hit back at what he said was the rewriting of the Conservative party's history on apartheid.

Former cabinet minister Peter Hain, whose parents were both South African anti-apartheid campaigners, had earlier recalled Mandela's wit.

He told MPs that he had once received a note of apology for missing his upcoming wedding, with the words: "Perhaps I will be able to come next time".

But Mr Hain said: "It really does stick in the craw when Lord Tebbit, Charles Moore and others similar tried over recent days to claim that their complicity with apartheid - and that's what I think it was - somehow brought about its end.

"Lord Tebbit told BBC World, in a debate with me, that they had brought about Mandela's freedom.

"I know for a fact that Nelson Mandela did not think so."