WASHINGTON – President Obama wrapped up a weeklong visit to Africa on Tuesday, a tour overshadowed at times by the legacy of his predecessor and a political hero with a bid for his own mark on the continent.

Obama headed home to Washington after ending his tour of Senegal, South Africa and Tanzania with a pledge to help Africa with a seemingly simple service that has hampered the continent's development: electricity. Nearly 70 percent of Africans don't have electricity, Obama said in Tanzania, calling it "one of the biggest hurdles" to Africa's economic development.

The United States is committing some $7 billion toward Obama's initiative, Power Africa, to double access to electricity. Private companies have committed more than $9 billion.

"That's what all our efforts are going to be about: making sure that Africans have the tools to create a better life for their people, and that the United States is a partner in that process," Obama said.

Before the event, Obama appeared with former President George W. Bush, whom he had criticized on the campaign trail but whose dedication to eradicating disease and poverty in Africa he hailed at several points during this trip.

He and Bush stood side by side in a moment of silence to remember the victims of the Al-Qaida terrorist attack on the U.S. Embassy in Dar es Salaam in 1998. The two laid a wreath at a memorial for the victims of the truck bombing, which killed 10 Tanzanians and wounded more than 85 Americans and Tanzanians. They talked quietly with embassy staff who had survived the attack and with victims' family members, but they didn't speak publicly.

The appearance for the two presidents was coincidental, but Obama found himself faced with Bush's legacy numerous times during the trip, praising the former president's commitment to Africa.

Bush's AIDS program cost billions and would be unlikely in the current political climate, said John Campbell, a senior fellow for Africa policy studies at the Council on Foreign Relations, a research center.

The administration acknowledged ahead of the trip that there had been "great disappointment" on the continent that the first African-American U.S. president hadn't made Africa a priority in his first term, and Obama told a group of business leaders in Tanzania that he was making the trip early in his second term "because I intend for this to be the beginning of a new level of economic engagement with Africa."

He pledged to build on the trip, and said his treasury and energy secretaries would visit the region soon.