Soldiers attempted to seize power in oil-rich Gabon by taking over a national radio station and calling on the people to “rise up” while ailing president Ali Bongo is out of the country.

The group, calling itself the Patriotic Youth Movement of the Gabon Defence and Security Forces, stormed into a studio in the capital Libreville early on Monday morning.

Its leader, who identified himself as Lieutenant Kelly Ondo Obiang, deputy commander of the Republican Guard, read out a statement saying the army wanted to “restore democracy”.

Flanked by two other men holding weapons and dressed in camouflage uniforms and green berets, he also called on the Gabonese to join “Operation Dignity” and take over airports, ammunition bunkers and means of transport.

A few hours later government spokesperson Guy-Bertrand Mapangou claimed the situation was under control. Describing the plotters as a “group of jokers”, he said two suspects had been killed and seven had been arrested. However, activists supporting the coup insisted it was still ongoing.

Mr Bongo, 59, has been away from Gabon since he suffered a stroke in Saudi Arabia in October. He recently addressed the country in a new year message while receiving treatment in Morocco and insisted he was feeling better.

In his statement, Lieutenant Obiang said that the Mr Bongo’s appearance “reinforced doubts about the president’s ability to continue to carry out of the responsibilities of his office”.

Support free-thinking journalism and attend Independent events

“It is time to take our destiny in hand,” he said. “The time has come when the long-awaited day has arrived. This day the army decided to stand with its people to save Gabon from chaos.

“Wake up your neighbours … rise up as one and take control of the street.”

He also said the coup was being carried out against “those who, in a cowardly way, assassinated our young compatriots”, a reference to deadly clashes between protesters and police after Mr Bongo was declared the winner of the 2016 election.

The president won by fewer than 6,000 votes but the European Union said it found anomalies in the province of Haut-Ogooue, where he won 95 per cent on a 99.9 per cent turnout.

Violent clashes break out in Gabon as President Ali Bongo declares victory Show all 10 1 /10 Violent clashes break out in Gabon as President Ali Bongo declares victory Violent clashes break out in Gabon as President Ali Bongo declares victory A supporter of Gabonese opposition leader Jean Ping prays in front of security forces blocking a demonstration trying to reach the electoral commission in Libreville as another protestor lays on the ground in distress AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory A wounded supporter of Gabonese opposition leader Jean Ping lies on the ground in Libreville AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory Supporters of Gabonese opposition leader Jean Ping face security forces (unseen) blocking the demonstration trying to reach the electoral commission in Libreville, as part of a protest sparked after Gabon's president Ali Bongo was declared winner of the contested election AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory A man reportedly wounded during unrest in Libreville is attended to by paramedics at a hospital AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory A Gabonese soldier runs to take position as supporters of opposition leader Jean Ping protest in front of security forces blocking the demonstration trying to reach the electoral commission, in Libreville AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory A supporter of Gabonese opposition leader Jean Ping, holding a flag of Gabon, faces riot policemen blocking the access to the electoral commission in Libreville AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory A protester runs amid tear gas canisters during confrontations with the police in Libreville AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory Gabonese soldiers run to take position as supporters of opposition leader Jean Ping protest in front of security forces blocking a demonstration trying to reach the electoral commission in Libreville AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory A distressed supporter of Gabonese opposition leader Jean Ping is carried away as protestors clash with anti riot policemen in Libreville AFP/Getty Images Violent clashes break out in Gabon as President Ali Bongo declares victory The flash of an explosion is pictured amid flames and smoke billowing from the National Assembly building in Libreville after it was set ablaze by demonstrators protesting after Gabon's president Ali Bongo was declared winner of the contested election Gabon's national assembly was set ablaze on August 31, 2016 evening by angry protestors who took to the streets after an announcement that President Ali Bongo had been re-elected, witnesses said."The whole building is catching fire," a man at the scene who gave name as Yannick told AFP. / AFP PHOTO / MARCO LONGARIMARCO LONGARI/AFP/Getty Images AFP/Getty Images

Witnesses described hearing sporadic gunfire in the capital Libreville and said soldiers fired tear gas to disperse a crowd of about 300 people who gathered outside the radio station to support the attempted coup.

Military tanks and armed vehicles patrolled the streets, a curfew was imposed and the internet and electricity were cut. Services were restored at around 8.30am local time.

The coup was condemned by both the African Union and former colonial power France, which still has a permanent military force of 300 soldiers in Gabon.

“We condemn any attempt to change government outside constitutional rules,” French foreign ministry spokesperson Agnes von der Muhll said in a statement. “Gabon’s stability can only be ensured in strict compliance with the provisions of its constitution.”

The 8,900 French citizens registered in the country were advised to avoid moving around Libreville.

“I reaffirm the AU’s total rejection of all unconstitutional changes of power,” said African Union Commission chair Moussa Faki Mahamat in a tweet.

Mr Bongo took over as president in 2009 following the death of his father Omar, who ruled Gabon for 42 years.

The attempted coup comes just days after Donald Trump announced that US armed forces had been sent to Gabon because of the security situation in the Democratic Republic of the Congo.

Eighty personnel were deployed “in response to the possibility that violent demonstrations may occur” following the elections on 30 December, he said.​