The president of Ghana, John Evans Atta Mills, died Tuesday afternoon at a military hospital shortly after being admitted for undisclosed reasons. He was 68 years old.

The president's death was announced by his chief of staff. Though the official cause of death was not announced, an unnamed presidential aide who spoke to Reuters said Mills complained of pains on Monday evening before entering the hospital when the conditioned worsened.

A statement from the president's office sent to Reuters reads: It is with a heavy heart ... that we announce the sudden and untimely death of the president of the Republic of Ghana.

Vice President John Dramani Mahama, 53, took the oath of office as head of state before a somber parliament hours after the announcement of Mills' death. He will serve as caretaker president until the elections at the end of the year. 

Mills, who served as vice president from 1997 to 2000, was formerly a law professor at the University of Ghana. He ran for president unsuccessfully in both 2000 and 2004, losing both times to John Kufuor, who stepped down after serving the maximum two four-year terms. He finally took the position in 2009 after a tight race against Nana Akufo-Addo of the then-ruling New Patriotic Party the previous year.

BBC News writes that at first, the news of his death was disbelieved in Ghana since there had been so many rumors and false reports surrounding the president in the past. As Elizabeth Ohene, a journalist and member of the former government, said: For the past three or four years there's been news he's been unwell and rumours of his death - twice - and he appeared with grim humour to say they were exaggerated, insisting he was well.

Mills leaves behind a country he had transformed into a productive oil economy over the past two years, winning praise from the international community for his efforts at democratization and economic growth. During his successful 2008 campaign, he ran on a platform promising economic change. The Independent writes of his legacy. People are complaining. They're saying that their standard of living has deteriorated these past eight years, he said at the time. So if Ghana is a model of growth, it's not translating into something people can feel.

In July 2009, Mills welcomed U.S. President Barack Obama on his visit to Ghana. Earlier this year when Mills visited Washington, Obama hailed him, saying: Ghana has become a wonderful success story economically on the continent. In part because of the initiatives of President Mills, you've seen high growth rates over the last several years. Food productivity and food security is up. There's been strong foreign investment.

When Mills passed away, he was in the process of preparing for his campaign for a second term, once again running against Akufo-Addo.