(CNN) -- Ghanaian officials swore in a new president Tuesday, hours after the death of the West African nation's leader.
John Evans Atta Mills died suddenly at a military hospital Tuesday afternoon a few hours after becoming ill, Chief of Staff John Henry Martey Newman said in a statement. He was 68.
In a ceremony broadcast on state television, John Dramani Mahama -- formerly Ghana's vice president -- became the country's new president and ordered that flags be flown at half-staff for a week.
"This is the saddest day in our nation's history. Tears have engulfed our nation and we're deeply saddened and distraught. I never imagined that one day I will address our nation in such difficult circumstances," Mahama said. "I'm personally devastated. I've lost a father, I've lost a friend, I've lost a mentor and a senior comrade."
Officials did not specify what caused Mills' death. The president had denied rumors about his health for months.
"Does my continued living pose a threat to some people?" he told reporters at a January event, according to the state-run Ghana News Agency.
On June 25, he returned from a medical checkup in the United States, the news agency reported.
Mills was a former law professor and a tax expert. He was Ghana's vice president from 1997 to 2000.
Before his political career, he taught at the University of Ghana and also was a visiting lecturer at Temple University in Pennsylvania and Leiden University in the Netherlands.
Mills ran for president unsuccessfully in 2000 and 2004 before narrowly winning a runoff in 2009.
Mills' death came several days after he celebrated his 68th birthday. He had said he would run for re-election in December.
In a statement read on his behalf by Ghana's information minister Monday, Mills said his government had focused on developing the nation's economy, according to the Ghana News Agency.
"We made a promise to expand our country's infrastructural base in support of our economy take-off," the statement said. "We also decided to invest in the people of our country so as to make them competitive both locally and abroad."
Mahama said Tuesday that Mills was a "prince of peace" who "brought a distinctive insight into Ghanaian politics."
The opposition New Patriotic Party expressed condolences in a statement Tuesday.
"We join the nation in mourning this sad loss to Ghana," the statement said.
U.S. President Barack Obama met with Mills when he visited Ghana in July 2009. Obama praised the country as a model for democracy and stability when Mills visited Washington this year.
"Ghana has become a wonderful success story economically on the continent," Obama said. "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."
In a statement Tuesday, British Prime Minister David Cameron described Mills as "a tireless defender of democracy in West Africa and across the continent."
Part of a former British colony, Ghana was among the first African countries to gain independence, in 1957. It endured a series of coups before a military dictator, Jerry Rawlings, took power in 1981. Rawlings led Ghana through a transition to democracy about 10 years later.
Mahama, 53, is a former member of Ghana's parliament who has served as director of communication for the National Democratic Congress party.
On Tuesday, the new president called on Ghanaians to respect Mills' legacy.
"Our finest tribute to him at this moment is to maintain the unity and stability of our nation," Mahama said.
Share your memories of Mills with CNN iReport.
Journalist Israel Laryea contributed to this report.