WASHINGTON - Barack Obama and Nelson Mandela are forever linked in history as the first black presidents of each of their countries, inspiring millions in the United States and South Africa.

On Thursday, after Mandela died, a somber Obama paid tribute to the man who inspired the political career of a 19-year-old college student and future president of the United States.

"My very first political action, first thing I ever did that involved an issue or a policy or politics, was a protest against apartheid," Obama told reporters at the White House. "I would study his words and his writings. And like so many around the globe, I cannot fully imagine my own life without the example that Nelson Mandela set. And so long as I live, I will do what I can to learn from him."

In Washington and across the United States, politicians of all stripes honored the 95-year-old Mandela, who led the emancipation of South Africa from white minority rule after 27 years in prison.

Former President George W. Bush, who hosted Mandela at the White House in 2005, called the man affectionately known in his country as "Madiba" as "one of the great forces for freedom and equality of our time."

His father, former President George H.W. Bush, who in June 1990 became the first U.S. president to welcome Mandela to the White House, said as president he "watched in wonder as Nelson Mandela had the remarkable capacity to forgive his jailers . . . setting a powerful example of redemption and grace for us all."

Former President Bill Clinton, who tweeted a photograph of himself meeting with Mandela, said the world "has lost one of its most important leaders."

"We will remember him as a man of uncommon grace and compassion, for whom abandoning bitterness and embracing adversaries was not just a political strategy but a way of life," he said. "All of us are living in a better world because of the life that Madiba lived."

Mandela will be buried, according to his wishes, in the village of Qunu, where he grew up. Obama and a slew of world leaders are expected to attend Mandela's funeral.

Last summer, Obama traveled to South Africa as part of a multi-country trip. He scrubbed a planned visit to Mandela as the former president lay in a hospital. Instead, Obama's trip was transformed into a tribute to Mandela.

He spoke about Mandela, he prayed for him, he visited his family.

"He achieved more than could be expected of any man," Obama said. "And today, he's gone home. We've 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."