ALGIERS — The prime minister of Algeria offered an unapologetic defense on Monday of the country’s tough actions to end the Sahara hostage crisis, saying that the militants who had carried out the kidnappings intended to kill all their captives and that 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 American 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.

American counterterrorism officials and experts said they would have taken a more cautious approach, using detailed surveillance to gain an information advantage and hopefully outmaneuver 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.