ALGIERS — The prime minister of Algeria offered an unapologetic defense Monday of the country’s tough actions to end the Sahara hostage crisis, saying the militants who had carried out the kidnappings intended to kill all captives and the army saved many from death by attacking.
But the assertion came as the death toll of foreign hostages rose sharply, to 37, and as US officials said they had offered sophisticated surveillance help that could minimize casualties, both before and during the military operation to retake a seized gas field complex in the Algerian desert.
At least some of the assistance was accepted, they said, but there were still questions about whether Algeria had taken all available steps to avert such a bloody outcome.
US counterterrorism officials and experts said they would have taken a more cautious approach, using detailed surveillance to gain an information advantage and outmaneuvering the militants.
But others declined to second-guess the Algerians, saying events had unfolded so rapidly that the government might have felt it had no choice but to kill the kidnappers, even if hostages died in the process.
The debate over how the Algerians handled one of the worst hostage-taking episodes in recent memory reflects conflicting ideas over how to manage such mass abductions in an age of suicidal terrorist acts in a post-9/11 world.
The Algerians — and some Western supporters — argue that the loss of innocent lives is unavoidable when confronting fanatics who will kill their captives anyway; others say technology provides some means of minimizing the deaths.
At a news conference in Algiers, the prime minister, Abdelmalek Sellal, portrayed the military’s deadly assaults on the Islamist militants who had stormed an internationally run gas-producing complex Wednesday as a matter of national character and pride.
''The whole world has understood that the reaction was courageous,’’ Sellal said, calling the abductions an attack ‘‘on the stability of Algeria.’’
It was the Algerian government’s first detailed public explanation of its actions.
Sellal said that the 37 foreign workers killed — higher than the 23 previously estimated — came from eight countries and that five captives remained unaccounted for.
It was unclear how many had died at the hands of the kidnappers or the Algerian Army.
US officials said three Americans were among the dead and seven had survived. The dead have been identified as Victor Lynn Lovelady of Houston, Gordon Lee Rowan, of Sumpter, Ore., and Frederick Buttacio of Katy, Texas.