BAMAKO (Reuters) - Islamist militants armed with rockets and explosives raided the headquarters of an African military taskforce in central Mali, leaving at least six people dead on Friday, a spokesman for the force said.

Slideshow ( 6 images )

Assailants driving a vehicle rigged with bombs attacked the compound in the town of Sevare as some exchanged gunfire with Malian troops and fought to get in, officials said.

Pictures from the scene showed the charred remains of a vehicle, a crater and the battered walls of the buildings, which are used by the G5 Sahel, a regional force created last year to root out jihadists in West Africa’s semi-arid Sahel region

A spokesman for the G5 force - which is made up of soldiers from Mali, Niger, Burkina Faso, Chad and Mauritania - said two soldiers and four assailants died in the attack.

“The attackers fired rockets at the headquarters and some of them infiltrated the compound. There was an exchange of fire,” defense ministry spokesman Boubacar Diallo told Reuters.

A U.N. source in Sevare, speaking on condition of anonymity, said that the compound was hit by a car bomb. Gunfire had died down by mid-afternoon, the source added.

Extremism watchdog SITE, which monitors militant activity globally, said Al Qaeda’s branch in Mali had reportedly claimed responsibility for the attack and described it as a suicide bombing.

The attack comes a month before Mali’s presidential election.

Violence by Islamist militants has proliferated in the sparsely-populated Sahel in recent years, with groups linked to al Qaeda and Islamic State using central and northern Mali as a launchpad for attacks across the region.

Western powers, including France and the United States, have provided significant funding to the G5 in a bid to beat back the jihadists. But the force has been slow to get off the ground, hobbled by delays disbursing the money and coordinating among the five countries.

The French defense ministry said in a report on Thursday that around 15 assailants were killed when a detachment of its forces, alongside Malian commandos, clashed with a group of around 20 militants on June 22.

It said the clash, which required helicopter support, led to the seizure or destruction of many materials including two pickups and six motorcycles, munitions and heavy and light weapons.

A separate U.N. peacekeeping mission in Mali, MINUSMA, declined to comment on the attack on the G5 compound.