At least seven people have been killed after fighters with links to al-Qaeda attacked an army camp in central Mali near the Mauritania border, according to local officials and a UN military source.

The attack occurred in the early morning hours in Nampala, a local official told AFP news agency on Monday.

The town lies 530km northeast of the capital Bamako.

This is the closest they have struck to the city since a French-led war forced them from power across the desert north nearly two years ago.

Security sources later confirmed to Al Jazeera that the town of Nampala, which has the largest military installation in the region, was regained after temporarily being fully taken control of by the attackers, who had raised their banners on the military installations.

"Those Malian soldiers who were not able to escape had their throats cut," the source said.

The fighters were thought to have withdrawn from the town.

The fighters arrived in about a dozen vehicles and remained in the town of about 10,000 residents, witnesses told AP news agency.

There has been no immediate claim of responsibility but security forces blamed al-Qaeda fighters in the Wagadou forest.

While fighters have staged a series of deadly attacks on Malian soldiers and peacekeepers, those assaults have been concentrated in and around their former seats of power in Gao and Kidal.

Northern Mali fell under control of Tuareg separatists and then al-Qaeda-linked fighters following a military coup in 2012.

A French-led intervention in early 2013 scattered the fighters, but some have remained active.

France still has about 1,200 troops operating in Gao and other parts of northeastern Mali as part of a five-nation counterterrorism operation codenamed Barkhane.

Source: Al Jazeera and agencies