(CNN) -- Gabon's President Omar Bongo, Africa's longest-serving ruler, died Monday morning, the country's prime minister said, settling conflicting reports from government and media accounts.
Gabon's President Omar Bongo, who died Monday, was Africa's longest-serving ruler.
Calm was reported after the announcement, but Gabon's Ministry of Defense nonetheless announced it was closing all of the country's land, air and sea ports, according to a ministry statement.
The statement, which was broadcast on state television and radio, said that in "the best interest of the nation, the Ministry of Defense calls on the population to increase their vigilance and patriotism during this difficult and painful time the country is facing."
In a statement, Prime Minister Jean Eyeghe Ndong said Bongo suffered cardiac arrest at a hospital in Barcelona, Spain.
"He dedicated his political life to his country and the Gabonese people, always cultivating the unity and cohesion of the Gabonese toward a true peace," Ndong said.
The government declared a 30-day national period of mourning.
Bongo, 73, had been receiving treatment for intestinal cancer at the Quiron clinic in Barcelona, Spain, according to the Gabonews agency.
Earlier in the day, the prime minister strongly refuted initial French news reports of Bongo's death. He had vowed to lodge a protest with the French authorities about "repeated leaks in the French press."
Shortly afterward, hospital officials reported Bongo's passing to Gabonese officials.
Bongo took power in 1967, seven years after the West African country's independence from France.
He imposed one-party rule a year after succeeding the country's first president, who died in office.
He allowed multiparty elections after a new constitution in 1991, but his party has retained control of the government since then.
President Obama said Bongo "played a key role in developing and shaping the strong bilateral relationship that exists between Gabon and the United States today."
"President Bongo consistently emphasized the importance of seeking compromise and striving for peace, and made protecting Gabon's natural treasures a priority," Obama said in a statement Monday. "His work in conservation in his country and his commitment to conflict resolution across the continent are an important part of his legacy and will be remembered with respect."
CNN's Per Nyberg and Al Goodman contributed to this report.