The United Nations Security Council condemned a rocket attack that killed two UN peacekeepers and a contractor in northeast Mali, warning the assault could be a war crime.

In a unanimous declaration, the council's 15 member countries urged the Malian government to "swiftly investigate this attack and bring the perpetrators to justice and stressed that those responsible for the attack should be held accountable".

"The members of the Security Council underlined that attacks targeting peacekeepers may constitute war crimes under international law," a statement added.

The Council also stressed its "full support" for the UN mission in Mali, MINUSMA, and the French troops that support it.

Ansar Dine extremists claimed the pre-dawn attack yesterday on the camp in Kidal, a week after a deadly siege at a Bamako hotel shocked the country.

Another 20 people were injured, four of them seriously.

"Our camp in Kidal was attacked early this morning by terrorists using rockets," said an official from the UN peacekeeping mission in Mali (MINUSMA), adding that two Guinean UN peacekeepers and a civilian contractor were killed.

Militant group Ansar Dine (Defenders of the Faith) has claimed responsibility for the deadly attack.

The attack was "in response to the violation of our lands by the enemies of Islam," one of the group's senior figures said by phone.

The attack came eight days after a siege at a luxury hotel in Mali's capital Bamako, in which 20 people died including 14 foreigners.

Armed men held around 170 guests and staff hostage in the 20 November siege that lasted about nine hours before Malian and international forces stormed the hotel to free the captives.

Two separate militant groups claimed responsibility for the hotel assault: the Al-Murabitoun group, an Al-Qaeda affiliate led by Mokhtar Belmokhtar, and the Macina Liberation Front (LWF) from central Mali.

Mali has been torn apart by unrest since the north fell under the control of jihadist groups linked to Al-Qaeda in 2012.

The Islamists were largely ousted by a French-led military intervention early the following year, but large swathes of Mali remain lawless and prone to extremist attacks.

MINUSMA's mission has been the costliest for UN peacekeepers in terms of human lives since the 1993-95 UNOSOM II mission in Somalia.