AYATOLLAH KHOMIENI has now spoken up in behalf of his Iranian supporters, guests in this country, who succeeded in bringing about a confrontation with the authorities in the District two Sundays ago. He suggests that they are being "tortured" and otherwise mistreated in the federal prisons in which they now sit. Implicit in his words, and explicit in the words of others in Tehran, is a threat to make the 52 American hostages pay -- that is, pay more than they already have otherwise would.

We think the ayatollah can safely relax. For his own reasons, he may wish to send expressions of solidarity to his countrymen, who have carried from the streets to their cells their refusal to acknowledge the writ of the American government. What he may not fully understand, however, is that the United States is a country in which threats against the American hostages are not necessary to ensure the fair treatment of the Iranian detainees. There is a framework of law and a tradition of due process, and these protect even foreigners who show contempt for them. That is precisely the difference between the United States and Iran.

Apparently to embarrass the government, the protesters are fasting. To complicate legal proceedings, they have been slow to provide personal data. But there are humane ways to cope with a hunger strike and there are ways consistent with law and regulation to deal with immigration suspects. This is what should be done. It is simply, the American way.The un -American way would be to suspend accepted standards of humane treatment and legality in order to punish the Iranians or to throw them out.

The contrast is irritating between the illegal, unjustified and punitive captivity of the American diplomts and the privileges available to Ayatollah Khomeini's supporters. The latter have been able to live, study or work here and to exercise a right of protest unknown in their homeland. Police who may have roughed up some of them at once came under challange. In jail, they receive visitors and lawyers, are offered food on a Ramandan schedule, make phone calls, etc. It is especially galling that, having evidently violated the terms on which they were admitted to this country, they resist submitting themselves to a legal deportation proceeding.

But just as the threats of the ayatollah should not lead Americans to treat the Iranian suspects better than the law dictates, so the irritation of Americans should not lead to treating them worse.