Omar Bongo Ondimba, the president of Gabon, has died in a clinic in the Spanish city of Barcelona, the country's prime minister has said.
Bongo, who had been the longest-serving ruler of a African state, died at the Quiron clinic on Monday at the age of 73, Jean Eyeghe Ndong said in a statement.
"At 2:30 pm, the medical team informed me, as well as the officials and members of the family present, that the president of the republic, head of state Omar Bongo Ondimba had just passed away following a heart attack," the statement said.
Ndong said that he had earlier in the day visited Bongo at the clinic, where he had been admitted early last month.
"I noted at that time that the head of state whom I visited in the intensive care unit was alive and well," he said.
"But we knew that the health of the president had become a source of concern in recent days."
Gabon will observe a 30-day period of mourning from Monday to mark the death of Bongo, who had ruled the country for 41 years.
The government said it would respect the terms of the constitution, under which Rose Francine Rogombe, president of the senate and a member of the ruling Gabonese Democratic Party (PDG), is expected to take over as interim leader.
Ndong called on the Gabonese people to "remain united and stand together in contemplation and dignity."
The Gabonese prime minister had earlier denied reports in France that Bongo had died on Sunday.
The Gabonese government had previously said that Bongo was admitted to the Qurion clinic for a medical check-up but several sources said he was being treated for intestinal cancer.
Bongo said on May 6 that he was temporarily suspending his duties so that he could rest and mourn the death in March of Edith Lucie Bongo Ondimba, his wife.
While he came to power with French support, Bongo had been accused by Paris over luxury properties he had bought in France.
Anti-corruption groups had said that Bongo had purchased the properties with money embezzled from the state, claims he denied.