Leaders in Japan, Britain and elsewhere criticized Algeria for what they see as a trigger-happy response to the recent hostage crisis in the Sahara desert. But the brutal operation may well have been the only available way to end the standoff.

And that terrorist raid can only be interpreted as chilling confirmation that al-Qaida still has a long reach.

The outcome that left least 37 hostages dead along with 29 captors is a striking contrast to the last major kidnapping crisis in Algeria. In 2003, 32 European hostages were seized by a militant group.

All were freed unharmed, except one who died of medical causes in captivity after the Algerian government used a combination of force and negotiation to win their release.

That 21st century history lesson undercuts any implication that the Algerian government is either callous or incompetent in hostage crises.

In defending his government’s response to the raid on a major gas field facility last week, Algeria’s Prime Minister Abdelmalek Sellal said his military had used force against the kidnappers, identified as Islamic militants with ties to al-Qaida, for two reasons.

The militants rounded up foreigners working at the gas field, “put explosives on the hostages” and attempted to drive them to a jihadist stronghold in neighboring Mali where they could be held for ransom.

The Algerians then used military force to prevent them from leaving — a clash that resulted in some hostage deaths.

Second, the kidnappers were apparently prepared to blow up the gas-producing part of the installation, forcing hostages to go with them in what may have been a suicide mission. The army opened fire and the militants executed many hostages.

Despite the bloodshed, nearly 100 foreigners working at the site survived.

Notably, despite the death of three Americans working at the gas facility, the U.S. government has refrained from criticizing the Algerian government.

“The blame for this tragedy rests with the terrorists who carried it out, and the United States condemns their actions in the strongest possible terms,” said State Department spokeswoman Victoria Nuland.

The jihadists in Mali are reportedly led and armed by al-Qaida in the Maghreb (AQIM), an organization created from groups that inflicted a brutal, but unsuccessful civil war on Algeria in the 1990s. AQIM has grown rich by running drugs and kidnapping for ransom, and has used the money to buy arms looted from Libyan stockpiles.

Last week, France sent troops to Mali to begin an effort to drive the militants from their new base there. France’s move indicates that Mali could become a dangerous new launching ground for smuggling terrorists into Western Europe and the U.S. Terrorists from Western nations, including Canada, reportedly participated in the Algerian terrorist raid.

And on Wednesday, an Algerian security official told The New York Times that three of the surviving terrorists from the natural gas plant said they were assisted by Egyptian extremists who were involved in the Sept. 11 terror attack on the U.S. Consulate in Benghazi, Libya.

The Algerian hostage crisis and the jihadist successes in Mali mark the opening of another front by al-Qaida — and re-confirmation that the Obama administration was wrong in last year’s repeated assertions that al-Qaida had been largely neutralized.

It will take effective international cooperation to stem that terrorist tide. The role of Algeria will be critical.

That said, there should be a full accounting of what happened in the latest hostage crisis — including more details about the murderous terrorists who triggered it.