Soldiers stand guard at a checkpoint in Bouake, demanding bonus payments. (File photo: Yvan Sonh/Xinhua)

Three soldiers died after shooting erupted overnight at a base in Ivory Coast, which has been gripped by tensions within the military, security sources said Saturday.

Gunfire was heard coming from the barracks at Korhogo, a city in the north of the country, at around 1:00 am. "There are three dead soldiers," an officer said, without giving further details. A source at the local morgue said three bodies in military fatigues and with gunshot wounds had been taken to the facility.

In a separate incident, shooting was heard from a former UN base near Abidjan, lasting from about 1.30 am to after 3:00 am, a local resident in the nearby district of Abobo said. "We were all very scared. We don't know what's going on," another resident said. Calm returned on Saturday morning.

The incident took place against a backdrop of months-long tensions within the country's armed forces.

The former French colony suffered a decade-long civil war, splitting the country in two. Thousands of rebels were incorporated into the army after unrest when President Laurent Gbagbo was lost the 2011 elections to Alassane Ouattara.

But a string of revolts erupted from January to May this year after they mutinied to press demands for a promised bonus. They eventually received a payoff of 12 million CFA francs ($20 000) per head from the state.

There are also 6 000 "demobilised" rebels who have not been integrated into the military, and are also demanding a bonus. Four of them were shot dead in May when security forces intervened to disperse a protest. And on Tuesday, two former rebel leaders who obstructed a road in the central city of Bouaké were jailed.

The government last year unveiled plans to modernise the 22 000-strong military, part of which would involve the departure of several thousand men, particularly ex-rebels. But falling cocoa prices have severely crimped the government's coffers.