- It is the first time the rebels have struck so close to the city since elections last month.
- Armed groups opposed to President Faustin Archange Touadera carried out two simultaneous raids on Bangui's outskirts at dawn.
- The attacks took place nine and 12 kilometres from the capital.
Rebel forces in the Central African Republic on Wednesday mounted their closest attack to the capital Bangui before being repelled with the death of a peacekeeper, the country's UN mission said.
"The attack was repelled by Blue Helmets together with the Central African forces," the spokesman for the MINUSCA peacekeeping mission said in a statement.
A Rwandan member of the force was killed, he said.
It is the first time the rebels have struck so close to the city since elections on 27 December, a vote that followed what the authorities say was an attempted coup.
The UN force's spokesman, Lieutenant-colonel Abdoulaziz Fall, said the attack occurred at a MINUSCA position 12 kilometres (seven miles) from the centre of Bangui.
"Several rebels were captured, and more than 10 were killed," he told AFP.
Earlier, Interior Minister Henri Wanzet Linguissara said armed groups opposed to President Faustin Archange Touadera carried out two simultaneous raids on Bangui's outskirts at dawn.
The attacks took place nine and 12 kilometres from the capital, targeting two army brigades, the minister said.
"Thanks to the bravery of our forces and bilateral support, we were able to repel the assailants, who are now in disarray," he said.
Russia and Rwanda last month dispatched support, comprising heavily-armed Rwandan troops and Russian paramilitaries, to shore up Touadera's government under bilateral accords.
A MINUSCA officer, speaking on condition of anonymity, earlier said three CAR troops had been wounded. An AFP journalist saw the bodies of at least two rebels.
Many local people were fleeing the combat area for Bangui, carrying suitcases and bags, as occasional gunfire broke out.
Lais, a local man, said, "I'm afraid. I don't know even where my family is."
"All we want is peace," he said.
In the capital itself, the streets were deserted, apart from a heavy military presence, an AFP reporter saw.
In the runup to the elections, an anti-Touadera alliance of six armed groups called the Coalition of Patriots sought to advance on Bangui but were thwarted.
Their operation, according to Touadera, was an attempted coup fomented with the help of his predecessor, Francois Bozize.
Since then, the rebels have since carried out sporadic attacks, chiefly in towns far from the capital and on the RN3 highway, the crucial supply line linking Bangui with neighbouring Cameroon.
MINUSCA spokesman Vladimir Monteiro said UN and national troops repelled a "violent" attack on Saturday at Bouar, the country's fifth largest town, which straddles the RN3 about 350 kilometres northwest of Bangui.
In Grimari, 300 kilometres northeast of Bangui, armed groups fired rockets on Sunday at a MINUSCA base, Fall said.
Touadera was declared victor of the ballot on January 4, although the CAR's political opposition has cried foul.
The results account for only about half of registered voters, as hundreds of thousands were unable to cast their vote in areas held by rebels.
Militias claiming to represent ethnic or other groups control two-thirds of CAR's territory, raising income from mineral resources and "taxes" on traders and roadblocks.
CAR prosecutors have launched an investigation into Bozize, who came to power in a coup in 2003 before being overthrown in 2013, after which the country slid into sectarian conflict.
Thousands of people have died and more than a quarter of the population of 4.9 million have fled their homes. Of these, 675 000 are refugees in neighbouring countries.
Bozize denies allegations of any alleged coup.
MINUSCA has 11 500 troops in the CAR, making it one of the biggest UN peacekeeping operations in the world.
It was reinforced before the elections by 300 Rwandan peacekeepers sent from South Sudan for a two-month deployment.
The UN Security Council on Wednesday was to meet behind closed doors to debate a French motion on the presence of foreign troops and mercenaries in the former French colony, as well as an embargo on arms sales, which has been in place since the 2013 civil war.