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.

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

Eyewitnesses reported gunfire near the presidential residence early on Sunday morning, as soldiers announced on national TV that they were suspending the constitution. The rebel soldiers, led by Lt Col Pascal Tigri, justified their actions by criticizing Talon's management of the country.

This attempted coup comes amidst a backdrop of increased military coups across West Africa, raising concerns over regional stability.