WASHINGTON -- President Obama on Thursday paid tribute to Nelson Mandela, saying the former freedom fighter and barrier-breaking president “transformed South Africa and moved all of us.”

"He achieved more than could be expected of any man. Today he has gone home,” Obama said in brief but emotional remarks at the White House shortly after South African officials announced Mandela’s death. “We have lost one of the most influential, courageous and profoundly good human beings that any of us will share time with on this earth. He no longer belongs to us. He belongs to the ages."

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.

PHOTOS: Remembering Nelson Mandela

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."

ALSO:

Car bomb blast targets Yemen Defense Ministry; 25 killed

Karzai accuses U.S. of civilian deaths in November drone strike

Kerry opens Middle East trip discussing peace, Iran with Netanyahu

kathleen.hennessey@latimes.com

Twitter: @khennessey

christi.parsons@latimes.com

Twitter: @cparsons