By FRANCIS KOKUTSE and KRISTA LARSON
ACCRA, Ghana (AP) - President John Atta Mills' election victory secured Ghana's reputation as one of the most mature democracies in West Africa, a position further solidified Tuesday when the vice president took over only hours after the 68-year-old president died five months before finishing his first term.
John Mahama's swift inauguration underscored Ghana's stability in a part of the world where the deaths of other leaders have sparked coups.
"We are deeply distraught, devastated as a country," Mahama said after his swearing-in ceremony, where he raised the golden staff of office above his head.
Ghanaian state-run television stations GTV and TV3 broke into their regular programming to announce the president's death Tuesday afternoon. Government officials did not release the cause of his death, which came three days after his 68th birthday.
U.N. Secretary-General Ban Ki-moon said "President Mills will be remembered for his statesmanship and years of dedicated service to his country," according to a statement from his spokesman.
"At this time of national mourning, the secretary-general renews the commitment of the United Nations to work alongside the government and the people of Ghana in support of their efforts to consolidate the country's democratic and development achievements," the spokesman said.
Rumors had swirled about Atta Mills' health in recent months after he made several trips to the United States, and opposition newspapers had reported he was not well enough to run for a second term.
Some radio stations even announced that he was dead during one of his recent trips to the States. When Atta Mills returned to Ghana, he jogged at the airport and blasted those who had falsely reported his death.
U.N. Secretary-General Ban Ki-moon said, "President Mills will be remembered for his statesmanship and years of dedicated service to his country," his spokesman said. Ban pledged that the United Nations would support Ghana's efforts "to consolidate the country's democratic and development achievements."
On the streets of Cape Coast, kilometers (80 miles) from Accra, people held radios to their ears on the street, listening to the funeral hymns playing on FM stations and waiting for more information about the president's unexpected death.
"His speeches were full of a spirit of love and peace," said Efua Mensima, 45. "He was soft-spoken. I wept when I heard of his death."
In a predominantly Ghanaian section of Ivory Coast's commercial capital, a group of 10 men tried to organize a bus to take them to Ghana for the president's funeral.
"The Ghanaian people were happy with this president and his program for the development of the country," said Nour Ousmane Aladji, 27, a taxi driver who moved to Abidjan in 2000.
Chris Fomunyoh, the senior director for Africa for the Washington-based National Democratic Institute for International Affairs, said that Ghana's democracy could weather the death of a president.
In other nations in West Africa, the death of a ruler usually spells a coup, as it did in neighboring Guinea following the 2008 death of longtime dictator Lansana Conte, and Togo, where the military seized power after the president's death in 2005 in order to install the leader's son.
"Ghanaian democracy has been tested and its institutions function well," said Fomunyoh. "There's no reason to think that Ghana and its democracy will not handle this event properly."
Atta Mills was elected in a 2008 runoff vote that was the closest in the country's history _ and his third presidential bid.
"People are complaining. They're saying that their standard of living has deteriorated these past eight years," he told The Associated Press at the time. "So if Ghana is a model of growth, it's not translating into something people can feel."
He went on to serve as president as Ghana began grappling with how to deal with its newfound oil wealth from offshore fields discovered in the last five years. The country of about 25 million saw a growth rate of more than 14 percent last year, though some analysts say the handling of his time in office was less than stellar.
The government got involved in a dispute with Kosmos Energy, the owner of the country's Jubilee oil field, a spat that resulted in a delay in the proceeds from the country's nascent oil trade, said Peter Pham, director of the Africa Center at the Atlantic Council.
Atta Mills also was one of the only leaders in West Africa who didn't back plans for an intervention force during last year's near-civil war in Ivory Coast. Because of its shared border, Ghana became the main smuggling route for Ivorian cocoa.