President Barack Obama headed to Tanzania Monday, on the last leg of an African tour in which ailing Nelson Mandela's offstage presence complicated a key US diplomatic push in a rising continent.
Obama warned Sunday that Africa could only fulfill its destiny with leaders who strive to improve the lives of their people, and his stop in Tanzania is intended to boost a democracy viewed with approval in Washington.
He will be hot on the heels of Chinese President Xi Jinping, who included Tanzania on his first overseas tour in March. Talk of an economic rivalry in Africa between Washington and Beijing has been a theme of Obama's trip.
Obama spent the weekend paying homage to Mandela, the political hero who drew him into politics, on an ascent that led him to become the first black president in America, a country, like South Africa, with a tainted racial past.
He decided not to visit the father of modern South Africa, who lies critically ill in a Pretoria hospital, but paid repeated tribute to his legacy, painting him as one of history's most important political figures.
On Sunday, Obama stood in the tiny cell once occupied by Mandela on Robben Island outside Cape Town, and took his daughters to the lime quarry where Mandela and fellow prisoners once did futile, back-breaking, hard labour.
Later, in a speech at Cape Town University, Obama decried "thugs and warlords" who hold back the promise in Africa.
In a strident call for democratic change and good governance, Obama used the political legacy of Mandela and South Africa's emergence from grim years of racist apartheid rule as proof that freedom will ultimately prevail.
"History shows us that progress is only possible where governments exist to serve their people and not the other way around," said Obama, drawing loud and prolonged cheers from his audience of more than 1,000 people.
While Africa is "on the move," progress is based on a fragile foundation, Obama said.
In Tanzania, Obama will hold talks and a press conference with President Jakaya Kikwete and visit the Ubungo power plant, after unveiling a new $7 billion program to enhance Africa's electric power networks.
He will also lay a wreath at a memorial to those killed in the US embassy bombing in 1998.
His wife Michelle Obama will take part in a First Ladies forum hosted by her predecessor in the role, Laura Bush.
Former president George W. Bush, feted in Africa for his HIV/AIDS program which saved millions of lives, is also in Africa at the same time as Obama, but it is unclear whether they will meet.
Obama's goal in his Cape Town speech was to inspire a new generation of Africans with the belief that they could ignite political change and the potential of their continent.
He slammed those who "steal or kill or disenfranchise others," saying that the ultimate lesson of South Africa was that such brutal tactics will not work.
"So long as parts of Africa continue to be ravaged by war and mayhem, opportunity and democracy cannot take root," said Obama.
He also condemned the rule of Robert Mugabe in neighbouring Zimbabwe, where he said the "promise of liberation gave way to the corruption of power and the collapse of the economy".
Like the rest of Obama's trip to South Africa, the speech was rich in emotion when he mentioned his hero Mandela, who lies critically ill in a Pretoria hospital.
"You have shown us how a prisoner can become president," Obama told South Africans.
South Africa has made massive strides in delivering electricity, housing and water since the fall of apartheid in 1994.
But the progress has failed to dent anger over rampant poverty and joblessness, with one in four workers unemployed.
Judging by the rousing reception, Obama's words spoke to the frustrations felt by many in the room.
"I think all South Africans are fed up with individuals abusing state resources, putting money into their pockets, instead of serving the people," said Yibanathi Jezile who is in his final year of high school.
President Jacob Zuma's administration is under increasing fire for its largesse -- from an expensive security upgrade to his private home to irregularities in the granting of deals to do business with the state.