Gunmen attacked and fired rockets at a UN peacekeeping base in Kidal in northern Mali on Saturday, killing two soldiers and a civilian, the UN force said.
Olivier Salgado, spokesman for the UN's deployment in Mali known as MINUSMA, told Al Jazeera the attack was launched before dawn with five rockets landing inside the UN compound.
Salgado said 20 other people were wounded, four seriously.
"In the past we've had mortar shells land outside, but this time they made it into the camp," said Salgado.
Armed group Ansar Dine told the AFP news agency it was responsible for the attack.
Hamadou Ag Khallini, one of the group's senior figures told AFP by phone that the attack was "in response to the violation of our lands by the enemies of Islam".
The Special Representative of the UN secretary-general for Mali and head of its mission, Mongi Hamdi, condemned the attack.
"I want to reiterate that these attacks will not impede the determination of the United Nations to support the Malian people and the peace process, including through assisting the implementation of the Agreement on Peace and Reconciliation in Mali", Hamdi said in a statement.
The UN Security Council also condemned the attack and reiterated its "full support" for MINUSMA and the French forces that support it.
"The members of the Security Council called on the Government of Mali to swiftly investigate this attack and bring the perpetrators to justice and stressed that those responsible for the attack should be held accountable," the coundil said in a statement on Saturday.
French troops and the UN force are struggling to stabilize the former French colony where armed assailants attacked a hotel in the capital on November 20 and killed 20 people.
| Who is responsible for the Mali hotel attack?
Northern Mali was occupied by fighters, some with links to al-Qaeda, for most of 2012.
They were driven out by a French-led military operation, but the violence has continued.
Other West African governments are also battling insurgents. Boko Haram, the leading armed group in the region, has this year extended its attacks from Nigeria to the neighbouring states of Niger, Cameroon and Chad.
Source: Al Jazeera and agencies