BAMAKO Al Qaeda in the Islamic Maghreb has claimed responsibility for Friday's deadly attack on a U.N. police base in the northern Malian city of Timbuktu, a statement monitored by the SITE Intelligence group showed on Saturday.

Malian troops backed by U.N. helicopters recaptured the base in a former hotel hours after it was taken and a Malian commander and four attackers were killed. The precise number of attackers was unclear.

Militants have expanded their attacks in the region, killing 20 people in a raid on a hotel in Mali's capital in November and 30 more in an attack in the capital of Burkina Faso last month.

"Three heroes from the knights of ... (Al Qaeda in the Islamic Maghreb) were able to storm the Hotel Palmeraie, located in the centre of the city of Timbuktu, and which was taken as a headquarters by the forces of oppression falsely known as 'peacekeepers', the statement said.

Militants drove up to the nearly empty U.N. base in the former Hotel Palmeraie at the entrance to Timbuktu at dawn and detonated a car bomb before holing up inside, security sources said.

Islamist militants briefly held Timbuktu, an ancient trade and cultural hub, in 2012 and other northern towns until French forces drove them out a year later. They have launched a series of attacks and last year widened their attacks in Mali.