With the help of French special forces, Niger's military on Friday killed the last two jihadists holed up inside a dormitory on the grounds of a military garrison in the desert town of Agadez, and freed at least two soldiers who had been held hostage by the extremists, according to French and Nigerien officials.

For hours there had been conflicting reports on whether or not the al-Qaida-linked attackers had succeeded in kidnapping several soldiers inside the military base. But on Friday afternoon, Niger Defense Minister Kardijo Mahamadou confirmed their troops had broken through the attackers' defenses in the building where they had barricaded themselves. Once inside the dorm, the soldiers found and liberated the two hostages, who were unharmed, he said in an interview with The Associated Press.

"Our military forces and French special forces assaulted (the building) and the hostages — a total of two people — were freed," he said. "There were two kidnappers who were hiding in the military dorm, and both were killed. The operation is now finished," said Mahamadou.

Government spokesman Marou Amado confirmed that the assault was over: "There's no one left. It's over. We neutralized them," he said by telephone.

In Paris, a French Defense Ministry official confirmed that French forces had taken part in the operation and that the hostages had been freed, though he did not provide a number.

It brings to an end one of the Sahel region's most catastrophic attacks, which began on Thursday at dawn when suicide bombers simultaneously attacked the military camp in Agadez and a French-operated uranium mine 100 miles to the north. A total of 21 people and five jihadists were killed in the initial assault, after the attackers rammed their explosive-laden cars past the gates of the base and the mine, detonating them inside, according to the ministry of defense.

In Agadez, at least two jihadists survived the explosion. They ran into a nearby dormitory, from where they traded fire with government and French forces, said Amadou. It's unclear how long the standoff lasted.

In Paris, French Defense Minister Jean-Yves Le Drian told BFM television on Friday that France had intervened in the standoff at the request of Niger's president.

"The situation has stabilized, particularly in Agadez, where our special forces intervened in support of Nigerien forces at the request of the president of Niger," he said. "That allowed us to achieve a stabilization of the situation."