Benin's president has appeared on television to reassure citizens of the West African nation that the situation was now totally under control following an attempted coup earlier in the day.

I would like to commend the sense of duty demonstrated by our army and its leaders, who have remained... loyal to the nation, Patrice Talon said, looking calm during the live evening broadcast.

The government said it had thwarted the mutiny hours after a group of soldiers declared a takeover on national television. Later in the afternoon, huge explosions were heard in Cotonou, Benin's largest city and seat of government. They were thought to have been the result of an air strike.

Prior to the explosions, flight-tracking data showed that three aircraft had entered Benin's airspace from neighbouring Nigeria before returning home. A spokesman for Nigeria's president later confirmed that its fighter jets had gone in to take over the airspace to help dislodge the coup plotters from the national TV and a military camp where they had regrouped.

There have been a series of coups in West Africa before Sunday's thwarted attempt in Benin, heightening fears that the security of the region could worsen. Benin, a former French colony, has been regarded as one of Africa's more stable democracies. But Talon has faced accusations of suppressing criticism of his policies.

The nation is one of the continent's largest cotton producers, but ranks among the world's poorest countries. Nigeria, Benin's large neighbour to the east, has described the coup attempt as a direct assault on democracy.

The 67-year-old president said in his address that loyalist forces had cleared the last pockets of resistance held by the mutineers. This commitment and mobilisation enabled us to defeat these opportunists and avert disaster for our country. This treachery will not go unpunished, he added.

I would like to reassure you that the situation is completely under control and therefore invite you to go about your business peacefully this evening. It is not clear if there have been casualties, but the president expressed his condolences to the victims of this senseless adventure, as well as to those still being held by fleeing mutineers.

Earlier, government spokesperson Wilfried Leandre Houngbedji told news agency Reuters that 14 people had been arrested in connection with the attempted coup.

Eyewitnesses reported gunfire near the presidential residence early Sunday morning, as soldiers announced on national TV that they were suspending the constitution. They held some journalists hostage for several hours.

The rebel soldiers, led by Lt Col Pascal Tigri, justified their actions by criticizing Talon's management of the country, complaining about his handling of security issues and economic hardships exacerbated by policy decisions.

With elections approaching next year, the incident reflects ongoing political tensions in a country that, while considered relatively stable, has seen a rise in dissatisfaction with government policies.