Bangui (Gabon) (AFP) - The Central African Republic government and 14 armed groups struck a deal Saturday to end years of fighting that has killed thousands, the parties and a mediator said.

The deal, the seventh since 2012, was announced on Twitter by the government of President Faustin-Archange Touadera just a day after the African Union and UN-sponsored talks in Khartoum were suspended amid disagreements over amnesty.

"A peace agreement has been reached," said the tweet.

"This agreement should be initialled tomorrow (Sunday) and its signing will take place in Bangui in a few days," the Tweet added.

Also on Twitter, African Union Commissioner for Peace and Security Smail Chergui confirmed the breakthrough, adding some details of the pact still had to be ironed out.

"I am humbled to announce that with the exemplary cooperation I received from both the Government of the CAR and the 14 armed groups, we have secured a peace agreement today in the interest of the people of CAR."

Aboubakar Sidik, spokesman for one of the main armed factions, the Popular Front for the Rebirth of Central African Republic (FPRC) said: "We are happy a consensus has been reached on sticking points which were an amnesty (for militia fighters) and an inclusive government."

The talks, which started on January 24, were suspended repeatedly over several issues including rebel demands for an amnesty.

The armed groups also wanted the dissolution of the present government in favour of an interim regime led by someone from their side, according to a document obtained by AFP.

Under Western pressure, Bangui has always refused pardons for warlords, several of whom are under UN sanctions or cited for human rights violations in UN reports.

A Special Criminal Court (CPS) has been set up in Bangui to judge people accused of crimes in the country since 2003, but has so far done little.

And despite the peace initiative, the violence has continued.

Since the talks started, the mainly Muslim Union for Peace (UPC) has notably carried out several attacks on the central prefecture of Ouaka.

Story continues

None of the six earlier accords struck between the parties have managed to restore stability.

The former French colony has more than 12,000 UN peacekeepers (MINUSCA) in the country.

But rights group Amnesty International has criticised their failure to stop a rebel attack that killed scores of civilians at a displacement camp in the central town of Alindao last November.

Central African Republic is rich in mineral resources but remains one of the world's poorest nations.

It has struggled to recover from a 2013 civil war that erupted when President Francois Bozize, a Christian, was overthrown by mainly Muslim Seleka rebels.

In response, Christians, who account for about 80 percent of the population, organised vigilante units dubbed "anti-Balaka" in reference to the balaka machetes used by Seleka rebels.

Thousands of people have died in the violence, 700,000 have been internally displaced, and another 570,000 have fled abroad.