Ghana's President John Atta Mills, who was suffering from throat cancer, has died in the capital, Accra.

A statement from his office said the 68-year-old died a few hours after being taken ill, but did not give details.

"It is with a heavy heart…that we announce the sudden and untimely death of the president of the Republic of Ghana," the statement said.

Atta Mills has ruled the West African country since 2009.

A presidential aide said the leader had complained of suffering pains on Monday evening and he died on Tuesday afternoon, Reuters reports. He had returned to Ghana after visiting the US for medical checks.

Atta Mills came to power after narrowly winning against a candidate from the then governing New Patriotic Party, Nana Akufo-Addo, in polls in December 2008. He was to run for a second term in December.