It is dangerous to confuse fanaticism and lunacy. From the "mad" Mahdi in the Sudan, who murdered Gen. "Chinese" Gordon in 1885, to the "mad" Mullah in Somalia, who harassed British forces for 14 years at the turn of the century, fanatical leaders -- "mad" by Western standards -- have repeatedly shown extraordinary political cunning.

The Ayatollah Khomeini is no exception. Erratic as his actions may seem to Americans, they are all focused on a central objective. That is apparent from a careul reading of the events now occurring.

One can perceive a possible grand design that Khomeini is pursuing -- a design intended to achieve overwhelming popular acceptance of his new constitution. Some of the provisions of that constitution have already been leaked, and enough is known to show that it will transform Iran into a medieval Islamic state in which the ayatollah is enshrined as the effective deputy of God. The full text will presumably be unveiled within the next few days and a referendum to ratify it will be held on Dec. 2. We can, therefore, assume that everything the ayatollah is doing is focused on generating intense religious emotions that will climax on the day of referendum -- a day on which the Iranian people will turn the clock back several hundred years and accept subjugation to Islam as the supreme dictator of all aspects of their lives.

If that assumption is correct, the ayatollah's choice of the referendum date acquires a special logic. Nov. 21 marked the beginning of the month of Muharram, the first month in the new year of the Islamic calendar. It also marked the beginning of the 14th centennial of Islam. Between now and the end of the month, the days and nights will be full of grieving and religious excitement leading to a climax on the 10th day of Muharram, Nov. 30, which is known as "Ashura," the anniversary of the martyrdom of Hussein, the grandson of Mohammad, who was the first Imman in the Shiite hagiography. On that day, Iranians have long engaged in orgies of flagellation with young men marching in processions and cutting themselves with chains and knives. Thus, it seems likely that, in setting the referendum just following Ashura, the ayatollah hoped to capitalize on Shiite passions roused to their ultimate intensity.

The same consideration may well explain the timing of the assault on the U.S. Embassy. If that is the case, there would appear a strong chance that, before the end of November, the Americans in the embassy will be brought to trial in the pattern of the famous show trials in the Soviet Union (1936 to 1938), which were used to excite the people to rally round their communist leadership. If the American hostages are tried, we can expect evidence to be contrived and perverted in an effort to show the Iranian public that our embassy has not been a diplomatic mission so much as a nest of espionage. If such so-called evidence is revealed day by day, it will further inflame religious passion already stimulated by the symbolic importance of the first 10 days of Muharram -- and the climactic day of Ashura.

What does all this suggest as to the probable outcome for our beleaguered countrymen? Here one can only speculate. The most optimistic hypothesis might be that the ayatollah would decide, once he achieves his new sublime authority as a result of the referendum, to exercise compassion on those convicted by the mob's kangaroo court. Alternatively, he could be driven by the force of the mob itself and the passions his strategy has aroused to carry through with bloody punishment. Mobs incited to violence acquire a life of their own, turning on their creators.

Alternatively, he might -- contrary to his country's own interests or even his own desires -- be driven, by the momentum of the mob's passion, compounded perhaps by his own secret wish for martyrdom -- to carry through with bloody punishment.

Obviously, we are confronted here by circumstances of the kind and quality utterly foreign to American or even Western conceptions. What is required of America is forbearance of the kind we are poorly trained to exercise. When we are confronted by a people caught up in religious frenzy, we must move with great caution and circumspection. Any precipitate action could be fatal and self-destructive.

While being prepared to inflict appropriate punishment if the hostages should be killed, we must take care that a premature show of force will not create such extreme mob excitement that the ayatollah, whether he wishes it or not, may be forced to sanction a reckless and brutal act.

A century ago, Gen. "Chinese" Gordon's enemy, the Mahdi, did not wish to kill him. It was only when excited British public opinion forced Prime Minister Gladstone, against his will, to mount a rescue expedition that the Mahdi felt obliged to capture Khartoum and destroy him.