UN peacekeepers have deployed in the west of Central African Republic following surprise attacks by powerful armed groups involved in "a deliberate attempt to disrupt" upcoming elections in one of the world's poorest and most troubled nations.

The UN mission to the Central African Republic (MINUSCA) said it deployed forces on Friday following an offensive by the 3R, Patriotic Movement for Central Africa (MPC) and "anti-Balaka" militias.

"The mission emphasises that these coordinated attacks in well-identified areas involve a deliberate attempt to disrupt the elections," said the mission, which has 11,500 peacekeepers in the country.

The militias have accused President Faustin Archange Touadera of seeking to fix the planned legislative and presidential elections -- due to take place on December 27 -- and have warned of a violent response.

According to humanitarian and UN sources, armed groups have seized several localities along routes serving the capital Bangui, which is now threatened by a blockade.

"Reinforcement of the MINUSCA resources, including with air assets, is a response to the violence committed by these armed groups and which also affected Yaloke and Bozoum", towns just over 200 kilometres from Bangui, killing two members of government forces, the UN mission said.

The UN mission to Central African Republic has 11,500 peacekeepers in one of the world's poorest and most troubled nations
The UN mission to Central African Republic has 11,500 peacekeepers in one of the world's poorest and most troubled nations AFP / Camille Laffont

In New York, UN Secretary-General Antonio Guterres condemned the escalating violence and called on all sides to work towards ensuring conditions conducive to the holding of credible and peaceful elections, his spokesman Stephane Dujarric said in a statement.

The UN chief called on all parties to "resolve their differences peacefully... in the interest of the Central African people who have for too long suffered from violence and instability."

Tensions are very high in the CAR, with the government on Wednesday accusing former president Francois Bozize of a "plan to destabilise the country," while the opposition says it fears massive electoral fraud.

Bozize, who recently returned after years in exile, has been barred from running in the election by the country's top court as he had been sought in a international arrest warrant filed by the CAR on charges including murder, arbitrary arrest and torture.

Map of Central African Republic locating Bangui
Map of Central African Republic locating Bangui AFP / Vincent LEFAI

The ballot is a crucial test for one of Africa's most volatile countries, which spiralled into conflict in 2013 when Bozize was ousted by the Seleka, a rebel coalition drawn largely from the Muslim minority.

The coup triggered a bloodbath between the Seleka and so-called "anti-Balaka" self-defence forces, mainly Christian and animist.

France intervened militarily in its former colony and after a transitional period elections were held in 2016 and won by Touadera.

Inter-communal fighting has receded in intensity in the last two years, but militia groups hold sway over two-thirds of the country, often fighting over resources.

Bozize, 74, slipped back into the country in December 2019 and is accused by the government of trying to undermine it.

The former president retains a large following in the northwest, especially among the Gbaya ethnic group, the country's largest, and has many supporters in the army.

A group of militias which joined a February 2019 peace accord with Touadera on Thursday issued a communique lashing the agreement as a "patent failure."

The signatories, including 3R, MPC and two anti-Balaka factions, vowed to "restore security across the national territory... by any means" if the government "insists on manipulating the organising of the vote in order to carry out an electoral holdup."

The alliance of several armed groups "has been in action for several days with support at the highest level of the state in Chad and Congo Brazzaville," said conflict analyst Nathalia Dukhan, researcher for The Sentry, an investigative group.

"The ultimate goal is to prevent Touadera's re-election plan in the first round," she said.

The UN mission said that "following the invalidation of the candidacy of former President Bozize, and after his recent meetings with the three above-mentioned armed groups, security incidents have multiplied and intensified."

Bozize, however, says he accepts the court's decision and has since thrown his weight behind Dologuele.

With his backing, the former prime minister now appears to be the main challenger to President Touadera, 63.