The best way to honour former president Nelson Mandela is to live up to his example, US presidential hopeful Barack Obama said in a message recorded for broadcast at the Nelson Mandela museum near Qunu on Saturday.

"What an extraordinary privilege it is to take part in this birthday celebration. In part because of what Nelson Mandela means to South Africa; in part because of what you mean to the world, and in part because of what you mean to me," he said.

Obama said apartheid had moved him to become politically active and participate in the divestment movement in the United States.

The ANC leaders he met spoke about Mandela: "When I visited South Africa a few years ago, I had a chance to go to Robben Island and stand in your cell, and I reflected on your courage, your foresight and conviction, and on your fundamental belief that we do not have to accept the world as it is; that we can remake the world as it should be."

That was what led Mandela, Rosa Parks — who refused to give up her seat to a white bus passenger, and sparked a bus boycott — and civil rights activist Martin Luther King to help build a more just world.

"This is the story of 90 remarkable years that we celebrate today," said Obama. "But celebrations and simple words of admiration are not enough. They're not enough to honour a man who's brought hope to a world often filled with despair; who's brought so much love to a world so filled with hate and who's shown us how much we can achieve when we have the courage to be our better selves.

"No, the way to truly honour you, Nelson Mandela, is to act each and every day in our own lives to do our part for our fellow human beings and to live up to the example you continue to set each and every day," he added.

Mandela, South Africa's first black president, turned 90 on Friday and messages have been pouring in for him.

Madiba and his wife Grace Machel also celebrated their 10th wedding anniversary on Friday and hundreds of guests joined them for a celebration at a banquet in Qunu on Saturday night.

Sapa