Algeria today stoutly defended its longstanding practice of granting immunity to airplane hijackers.

The official Algerian Press Service published a commentary justifying the government's past and future willingness to accept hijacked aircraft here on grounds that its policy of negotiating with terrorists has saved lives.

It represented the first official Algerian comment on the successful West German rescue of hostages aboard a hijacked in the Somali capital of Mogadishu.

Evident in both the dispatch and a conversation with a high Algerian official - who asked to remain unnamed - was an uneasiness over mounting international critism of Algeria for allowing hijackers to use the North African country to make their escape.

Earlier in the month, Algeria mediated on behalf of the Japanese govenment when Japenese terrorists landed here aboard a Japan Air Lines DC-3 and released their last passengers in exchange for six imprisoned colleagues and a $6 million ransom.

The official said Algeria was "honor-bound" to abide by agreements reached with hijackers in order to save innocent lives. He recalled that his government to avoid misunderstandings, had insisted that Japanese officials state in writing their willingness to meet the hijackers' demands.

He said the conditions guaranteed that the terrorists could keep the ransom, would not be extradited and would not be photographed by the press. He indicated that the terrorists may have left Algeria, but insisted "The case is closed."

The official Algerian commentary said, "Experience shows that only by responding to skyjackers' demands that loss of life been avoided." It also noted that not a single person has died in a hijacking that ended here since the first such incident in 1968.

While admitting that the West German assault on the hijackers in Somalia had succeeded, the Algerian commentary noted that it involved "numerous risks and could have ended in catastrophe."

If there was a choice between a rescue operation and Algeria's policy of dialogue, the commentary said, the government's approach "is the only one possible and so far its attitude has been crowned with success."

"All those who militate for the preservation of human life congratulate Algeria," it added, and critics "Should go ask those who have been skyjacked to Algiers what they think about the matter."

With an increasing number of governments, including many in the Arab world, unwilling to allow hijackers to use their airports - a trend which became even more apparent during the Lufthansa saga - the Algerian official went to pains to defend his government's stand.

Algeria has steadfastly denounced airline hijacking as a "method of fighting" and "did not want to have the label of terrorists asylum stuck on our backs," he declared.

But while he said Algeria "would contribute very positively to international discussions about stopping hijacking," the official made it clear that his government would not allow rescue operations on its soil.

Some observers are also convinced that Algeria is also reluctant to crack down on terrorists because of its support for the palestine organizations - even though most of them appear to have abandoned hijacking as a tactic.

The official Algerian newspaper El Moudjahid also suggested today that West Germany itself was not about a bit of hypocrisy in its dealings with hijackers.

Referring to a proposal by Hans Dieter Gades, president of the West German Airline Pilots' Association, to boycott countries granting asylum to hijackers, the newspaper said:

"We wish to remind Mr. Gades that the German Federal Republic has received five aircraft hijacked from socialist (Communist) countries in recent years.

" . . . in all these cases the skyjackers were never extradited but were granted asylum on West German territory. We do not doubt Mr. Gades will take account of this additional information in pursuing his efforts."