Despite a personal appeal by President Reagan, it now seems certain that West German Chancellor Helmut Kohl will not approve the extradition of a Lebanese Shiite wanted by the U.S. for his role in the 1985 hijacking of a TWA flight. In that Beirut ordeal, hijackers murdered a U.S. Navy diver and held 39 Americans hostage for 17 days. Bonn has balked because somewhere in Lebanon, Hezbollah's terrorists have threatened to kill two West German hostages should Muhammad Ali Hamadei be handed over to the United States.

But before we rush to criticize the West Germans for going soft on terrorism, we should consider whether trying Hamadei in West Germany may even be preferable to his extradition. Were a West German court to convict and punish him for international air piracy, that would do more to demonstrate shared Western resolve than a U.S. trial for the same crime. It might also prevent the transformation of West Germany into a forward base of Shiite terrorism in Europe.

A major international convention actually obliges West Germany to try Hamadei for air piracy if it chooses not to extradite him. There is an understandable American desire to see American justice meted out for the hijacking of Americans. But the United States has a paramount interest in establishing that such hijackings, even when directed specifically against American planes and passengers, are crimes against the community of nations. That principle is already enshrined in international law, but it lacks courtroom precedents.

If the United States wants to build an effective league against hijacking, it should publicly welcome a West German decision to bear the burden of trying Hamadei for air piracy. This would also send a message to aspiring hijackers. Following Hamadei's arrest, a Hezbollah leader declared that ''even if it is proved that Hamadei was involved in the hijacking of a TWA plane, so what? We are at open war with the Americans, their planes, their cars, their people, and the Germans should keep out of it.'' Nothing would disabuse Hezbollah of this notion more thoroughly than a West German trial for the TWA hijacking.

For Bonn there is also a domestic political logic in favor of a West German trial for Hamadei. He was caught attempting to smuggle explosives into West Germany on a false passport. West Germans may be reluctant to make sacrifices in order to see justice done for crimes against others, but they surely cannot fail to uphold the law of their own land. Middle Eastern abuse of West German hospitality is an issue that distresses nearly all West Germans, who demand security in their own airports and streets. A broad West German consensus could be built behind Hamadei's trial on West Germany's own charges.

There is also a long-sighted rationale for a West German trial. If Hamadei were extradited to the United States, one or both West German hostages might well be murdered. Washington and Bonn would join together in condemning the killings as a heinous crime, but it is doubtful whether West Germany would ever arrest another Hezbollah terrorist or would-be terrorist again. Such persons, if detected, would stand a better chance of being expelled or allowed passage through West Germany. Hezbollah would be quick to press its advantage, in a bid to transform West Germany into a transit point for Shiite terrorists.

More freedom of movement through West Germany for Hezbollah's operatives would dangerously compromise the safety of Americans who work or travel in Europe. Shiite terrorists are today at the point reached in the early 1970s by Palestinian terrorists, who sought to achieve in Europe what they failed to accomplish in the Middle East. Now they are probing foreign ports of entry for any breach they might exploit in opening a second front in their war against the United States, Israel and France.

Once these terrorists enter West Germany, the country offers many advantages. Potential U.S. targets are more numerous there than anywhere else in Europe. And West Germany is home to the largest Iranian expatriate community in Europe, as well as a sizable Lebanese Shiite community.

Hamadei himself was based in West Germany, where he found anonymity in numbers. Murderers of Iranian dissidents in West Germany have also lost themselves in the expatriate crowd. If the West Germans fail to prove that they, too, feel violated by such deeds on their sovereign soil, Hezbollah's operatives will try to run the West German border gauntlet again and again. Those who succeed will invest every resource in building a secure West German base.

In contrast, a West German trial for Hamadei would require Bonn to take special precautions against Hamadei's supporters in Hezbollah, lest they launch a terror campaign during the trial. The West Germans would come to see this as their war too -- an American political goal of the first order.

The United States should urge the relentless prosecution of Hamadei on every charge that can legally be brought against him in West Germany. What is not clear is whether a West German court can try a Lebanese for the murder of an American Navy man in Beirut. If not, the United States should press for Hamadei's extradition -- but only after a West German trial for the hijacking.

Ultimately, the United States must find methods of retribution that do not depend exclusively on the good will of European friends and allies. In particular, the United States should intensify its own hunt for the other three men indicted for the same hijacking, who are presumed to be in Lebanon. The United States must lengthen its reach, and demonstrate to Hezbollah that Hamadei's trial is the beginning of judgment, not its finale.

The writer is a visiting fellow at the Washington Institute for Near East Policy.