A year ago last month, a young New York lawyer, David Emil, and a British researcher from Amnesty International, Anne Burely, sat around a table in a room in Tehran.

Hour after hour, for days on end, the victims of torture filed past. They gave their names, the dates and circumstances of their arrests. They described the prisons of the shah. They showed their scars: twisted limbs, ghasty burns from heated metal grills, deep wire-whip gashes in the soles of their feet which left them crippled for life.

And in taxicabs and on street corners, the investigators found, everyone had his own story of a brother, a cousin, a friend. Imprisonment and torture "was pervasive," Emil recalls. "It was impossible to speak to someone who hadn't been affected in a personal way."

His Imperial Majesty, King of Kings, Light of the Aryans, Shah Mohammad Reza Pahalvi, is ill with cancer, a refugee fleeing from one country to another. But 10 months after his fall from power, his alleged crimes still obsess the nation of 35 million people he left behind.

The record of torture, murder and imprisonment under the shah -- long an embarrassing issue for his close ally, the United States -- is at the core of the crisis over American hostages in Iran.

Iranian revolutionaries are demanding the extradition of a ruler they describe as a criminal on a par with Hitler and Stalin. There is talk at the United Nations of an international tribunal to hear of charges. Sen. Edward M. Kennedy, a candidate for president, has accused Pahlavi of running "one of the most violent regimes in the history of mankind."

U.S. diplomats won't discuss the shah's alleged crimes while Americans are being held. But independent investigations over a decade, such as the one by Emil and Burley, have revealed that the shah jailed thousands of political prisoners and allowed systematic torture by his secret police.

"The shah of Iran retains his benevolent image despite the highest rate of death penalties in the world, no valid system of civilian courts and a history of torture which is beyond belief," Amnesty International asserted in asserted in a 1974-75 report.

The International Commission of Jurists, a Geneva-based group of 45,000 lawyers and judges, concluded after a 1976 mission to Iran, "there is abundant evidence showing the systematic use of impermissible methods of psychological and physical torture of political suspects." It said the shah exercised "personal control" over SAVAK, his secret police.

The shah's record, however, must be viewed in the context of repressive governments throughout the Third World. "He wasn't the worst," said William J. Butler, an author of the jurists' report, citing Indonesia, where some 30,000 political prisoners are reportedly jailed, and Uganda, were an estimated 300,000 were murdered under Idi Amin.

Nor is the Iranian revolutionary government that succeeded the shah a model of human rights. More than 600 persons have been summarily executed since. February. Amnesty Internaltional is investigating torture allegations. Estimates of political prisoners range up to 2,000.

"There is no reason why a criminal should be tried in the first place," Ayatollah Ruhollah Khomeini said in an April television speech. "All one need do with criminals is establish their identity and, once this has been established, they should be killed straightaway."

How many people were imprisoned, tortured or murdered during the shah's 37-year reign is impossible to determine.

Although prisoner estimates in 1975 ranged as high as 25,000 to 100,000, the International Red Cross in April 1977 counted 3,087 political prisoners in 18 jails across Iran. The visit came after an international campaign against torture in Iran had prompted the shah to free some prisoners and undertake limited reforms.

Whatever the numbers, they don't convey the agony. The November 1978 visit by Emil and Burley confirmed the findings of previous missions. Common torture methods, they reported after interviewing more than 60 people, were: falanga (beating the soles of the feet); whipping with cables; electric shock; burning with cigarettes, candles and lighters; extended deprivation of sleep; hanging by the arms; burning on a heated metal grill; tying of the genitals with fine cable; rape; insertion of bottles and hot eggs into the anus.

According to Amnesty's report, issued in January, "A well-known religious leader, Ayatollah Mahmoud Taleghani, told the mission that, although he was not himself subjected to physical torture, some of his followers, including girls, were tortured in front of him. His daughter was arrested and tortured . . . Wives and husbands were made to observe each other being tortured."

Religious ovservances in prison were punished as evidence of political opposition, since many of the shah's foes were Islamic fundamentalists. Prisoners at Qasr Prison in 1976 who tried to observe Ramadan, a month of daytime fasting, were beaten when they attempted to eat at night, Amnesty was told.

When the refused to insult another religious leader, the exiled Khomeini, "one prisoner, Hassan Tahmasebi, was picked out for punishment. A prison officer urinated into his mouth and he was then raped by another officer called Asfari," the report said.

The mission was told, in detail, of a 10-month-old baby stamped by SAVAK officers in front of his parents and hospitalized with five broken ribs; a 75-year-old woman imprisoned and tortured because her dead son was a suspected opponent of the shah; a man sentenced to eight years in prison for giving "subversive" religious literatue to a friend; a woman, eight months pregnant, beaten and forced to watch her husband tortured -- her baby was born in prison.

Was the shah personally aware of the extent of imprisonment and torture? "Everybody told him," said Martin Ennals, head of Amnesty International. "I met with him personally in March 1977. He did not deny it. He said he had learned of it and stopped it. But our mission in 1978 confirmed that torture was still going on."

In 1976, the shah was asked about toruture by Le Monde. "Why should we not employ the same methods as you Europeans," he told the French newspaper. "We have learned sophisticated methods of torture from you. You use psychological methods to extract the truth; we do the same."

In the eyes of some American supporters, the shah's regime had to be repressive to keep his neighbor, the Soviet Union, at Bay and to maintain his controversial modernization program. As the shah told journalist Oriana Fallaci, "Believe me, when three-quarters of a nation doesn't know how to read or write, you can provide for reforms only by the strictest authoritarianism -- otherwise you get nowhere."

Butler says the human rights situation in Iran improved significantly in late 1977 after he and Ennals met separately with the shah. However, when the Novebmer 1978 mission found new evidence of torture, Ennals accused the shah of "gross hypocrisy."

An analysis of the shah's jurisprudence reforms by Amnesty attorney Brian Wrobel was reminiscent of a Kafka tale. Prisoners could still be held and interrogated indefinitely. They were not allowed to consult a lawyer before trial. Lawyers were not permitted to appeal the decisions of secret miltary tribunals, Wrobel told a House subcommittee last year.

"He did too little too late," Butler said. But the fall of 1978 massive demonstrations exploded throughout the country, eventually leading to the shah's downfall.

Khomeini and his followers have said that in the year before the shah's ouster in February, 60,000 to 100,000 persons were massacred. While it is true that government troops did fire point-blank into crowds of unarmed demonstrators, the figures appear vastly inflated. American journalists who witnessed many of the violent clashes estimate that as many as 5,000 persons died in all.

Most political prisoners were released before the shah fell. When revolutionaries arrived to liberate the jails and found hardly anyone there, they spent a few a days furiously digging holes, convinced that prisoners were being hidden in underground cells.

If the shah was tyrant, it can be argued that he was entirely in the tradition of Iranian history. "It has been a bloody history," said Yale University professor Firuz Kazemazadeh. "Throwing someone in boiling oil, goughing out their eyes, killing masses of people -- a great deal of this happened.

"No one in Iran thought torture was bad until the late 19th century. Between 1848 and 1854, 20,000 people were massacred, most of them Babis, members of a religious group." The Babis were predecessors of the group now known as Bahais.

Kazemzadeh, Iranian-born, said, "The distance separating todays Iran from the Middle Ages is very small. My father, who is 81 years old, was born in the Middle Ages. When he went to school at the age of 5, it was prohibited to teach that the earth was round. Now he lives in Pacific Palisades."