"He achieved more than could be expected of any man. Today he has gone home,” Obama said in brief but emotional remarks at the
Obama referred to his own distant connection to Mandela and the fight for racial equality. The president noted that his first experience with political activism -- "the first thing I ever did that involved an issue or policy or politics" -- was a college protest against apartheid.
"I would study his words and his writings. The day he was released from prison it gave me a sense of what human beings can do when they're guided by their hopes and not by their fears," Obama said.
Obama's admiration has largely been from afar. Obama met Mandela once, in a Washington hotel room in 2005 when Mandela was on a speaking tour and Obama was a senator. In recent years, Mandela's health has restricted his travel.
The first African American president of the United States and the first black president of South Africa have exchanged notes and spoken briefly on the phone.
First Lady Michelle Obama visited Mandela during her trip to South Africa in 2011.
But Mandela was gravely ill this summer, when President Obama traveled to Johannesburg. The president met with Mandela's family members but did not visit the ailing leader's hospital bed. Obama did journey to Robben Island, where Mandela was long imprisoned for challenging the white separatist government, and stood with his daughters in Mandela's former jail cell.
The president is expected to return to South Africa for Mandela's memorial service.
"So long as I live, I will do what I can to learn from him," Obama said. "To the people of South Africa, we draw strength from the example of renewal and reconciliation and resilience that you made real. A free South Africa at peace with itself -- that's an example to the world. That's Madiba's legacy for the nation that he loved."