Controversial religious judge Sadegh Khalkhali today sent 20 alleged drug traffickers to the firing squad after claiming to have broken the biggest drug ring in the Middle East.

Brushing aside beleaguered President Abol Hassan Bani-Sadr's precise orders limiting his role as head of an antinarcotics campaign to investigation alone, the self-proclaimed ayatollah ordered what was believed to be the largest group execution of common criminials since the revolution in February 1979.

Spokesmen at Qasr Prison, where the executions were carried out at dawn, said at least two of those shot had been arrested only two days ago and included in the trial already in progress.

Khalkhali recently defied Bani-Sadr in destroying the shrine of the deposed shah's father and has made a name for himself for his summary notion of justice.

Among the more than 300 Iranians executed on his instructions were 70 Kurds shot last summer for a variety of reasons having little to do with their alleged participation in the autonomous movement there.

Khalkhali, who became well known to Americans when he displayed the charred remains of servicemen involved in last month's aborted U.S. hostage rescue attempt, said he had turned down a $28.3 million bribe to spare the life of one defendant.

One woman was given a life sentence at the trial, in which Khalkhali promised to "completely crush" the drug traffic.

At least 2 million of Iran's 35 million citizens are believed to be herion or opium addicts, and opium cultivation is said to have increased markedly since the revolution.

Khalkhali said the drugs involved had been "imported" from Afghanistan, Pakistan, Iraq, Persian Gulf sheikdoms, Britain, France, West Germany, Greece, Lebanon, Syria, and Turkey.

However, both the herion and opium used here are believed to orginiate either locally or in Afghanistan and Pakistan, where they are shipped west toward more lucrative Western European and North American markets.

Khalkhali said the four-day trial has also revealed that the traffickers had set up "laboratories using new techniques to convert opium into herion" in 13 Iranian provincial cities.

In other developments:

The International Court of Justice at The Hauge said it would rule Saturday on a U.S. demand that Iran free 53 Americans held captive for 200 days.

Iran's U.N. ambassador, Mansour Farhang, said in a Tehran newspaper interview that continuing to hold the American hostages was increasing Iran's "international isolation" and did not benefit the country.

The official Pars News Agency reported that unidentified gunmen in a car fired at a building housing some of the hostages in the provincial city of Kerman, but that no one was hurt.

An Iranian fighter plane reportedly crashed at Tehran's Mehrabad Airport, killing its two crewmembers.

Pars reported that two helicopters violated Iranian airspace from neighboring Afghanistan for the second straight day today and were repulsed by Iranian border forces.