A candidate for president of Iran was asked last week to describe his political credentials.

"Praise be to Allah," he replied. "throughout my life I have tried to steer clear of politics."

After 2,500 years of monarchy, Iran is getting ready for its first presidential election, and so many candidates of varied background have come forth that printed ballots have been ruled out in favor of write-in forms.

At last count, 101 contestants -- all men -- were running for the nation's highest elective office, although just a handful are given any real chance of winning the Jan. 25 contest, which seems likely to be decided by a runoff two weeks later.

The prospect of a little public exposure has attracted a broad spectrum of would-be presidents, including one candidate who professes that only mass hypnosis can cure the nation's ills and another who declares that 10 years of torture by his wife has prepared him for high office.

So swollen are the ranks of fringe players that Iranian leader Ayatollah Ruhollah Khomeini warned this week that U.S. agents were plotting to subvert the election by putting up some candidates who are troublemakers and others who are known to be brainless perverts.

Then election officials tried to narrow the field by denying broadcast time on national television and radio to 80 minor candidates, claiming some of them were linked to SAVAK -- the dreaded secret police organized by deposed Shah Mohammad Reza Pahlavi.

Despite the confusion and carnival atmosphere that surrounds this first Iranian exercise in presidential politics, the upcoming contest carries great political significance in a nation controlled by a single royal family until the clergy led revolution, nearly a year ago.

Although Iranians were given a chance in recent months to vote for a new constitution and the establishment of an Islamic republic, they have yet to voice a preference for a style of national leadership to govern the nation.

Not only will they get that opportunity in the coming election, but they will have a real choice. While all of the serious candidates stress their knowledge of Islam, their ties to Khomeini, their strong nationalism and their role in the revolution, the front-runners represent quite different political persuasions.

Even though the president can be dismissed by the nation's top theologian, the constitution provides him significant powers -- appointment of the prime minister, approval of cabinet ministers, and the right to declare war -- so that the executive's brand of politics can greatly influence the nation's direction.

Among the early favorites, the political choices are:

A strong executive government with moderate economic policies represented by Ahmad Madani, 51, the recently resigned Navy commander and governor general of oil-rich Khuzestan Province whose call for "stability" has attracted the nation's middle class, big business and the military.

Radical Islamic economics of Abol Hassan Bani-Sadr, 47, minister of economic affairs and finance, whose nationalization of banks and foreign trade and program of abolishing interest on some bank loans has won him a following among some socialists and clergymen who oppose usury.

Islamic militance of Jalaleddin Farsi, 47, a Tehran University professor and one-time Iranian guerrilla instructor who advocates strong control for the nation's clergy, especially Khomeini. A kind of Moslem populist, he was little known until Iran's religious groups, including the powerful Islamic Republican Party, endorsed him.

Although Farsi can count on support from the mosque, religious leaders are said to fear that he will split the militant Islamic vote with Bani-Sadr, thereby neutralizing both candidacies. In some old-fashioned political horsetrading, Farsi was reported today to be considering a withdrawal from the race in favor of Bani-Sadr.

[Farsi submitted a letter offering to withdraw to his party officials Tuesday morning, but it could not be learned if it had been accepted, Reuter reported. It had been rumored that if he withdrew his candidacy he would be made prime minister in a Bani-Sadr administration.]

Although the detention of American hostages has not become a campaign issue, the 10-week occupation of the U.S. Embassy in Tehran overshadows the race and gives the Islamic militant captors an important weapon to influence the outcome.

Since they seized the embassy Nov. 4, the radical youths have created a poisonous atmosphere for any politician with the slightest hint of pro-Americanism in his background -- much as the virulent anticommunism in the United States during the 1950s damaged the careers of politicians suspected of having leftist pasts.

Former prime minister Mehdi Basargan, a centrist politician who was given a reasonable chance of winning the election, withdrew his candidacy after the embassy captors went on television last month and denounced Bazargan's one-time deputy and fellow Liberation Party member as a collaborator of the U.S. Central intelligence Agency.

No candidate has dared to criticize the popular embassy occupiers, although Bani-Sadr has recommended either releasing or punishing the American hostages so that the nation can get on with the more practical business of consolidating the Islamic revolution.

Farsi, the favorite of the embassy keepers, has taken a swipe at Bani-Sadr and another strong contender, Foreign Minister Sadegh Ghotbzadeh, by suggesting that the radical youths holding the hostages should help determine the nation's economic and foreign policies.

The hostage issue has become so linked with domestic politics here that it is considered unlikely that the embassy militants will agree to release the Americans before the election, and perhaps not until the runoff.

Except for his warning about the crowded field of candidates, Khomeini has stayed out of presidential politics, refusing to support a candidate and waiving his constitutional right to screen all contestants on religious grounds. Instead, he has urged the Iranian electorate to assume responsibility for selecting a president.

For politicians supposedly new to presidential sweepstakes, the candidates have shown a real flair for gaining attention and the campaign seems to have attracted great interest here in Iran's largest city.

Newspapers report the latest endorsements and political statements, city walls are plastered with campaign posters and canvassers weave through traffic jams handing out literature and tape recordings of the candidates positions.

Even dirty tricks seem to have entered the picture with Madani claiming that rivals have defamed him by saying he plans to stage a military coup and Farsi accusing opponents of tearing down his campaign posters.

No debates have been scheduled, but the first meeting of candidates almost ended in a fistfight when dozens of the contestants paced into the interior ministry the other day for allocation of broadcasting time on state television.

In what one newspaper called a "strong verbal quarrel," a fringe candidate named Mohammed Quaddasi blasted his late-arriving opponents for delaying the proceedings.

"Is this how future presidents intend to be punctual?" he asked with disdain.

But Sheik Sadegh Khalkhali, the roving Islamic judge who boasts of ordering the executions of more than 200 of the deposed shah's supporters since last February, saved the day by calling for "revolutionary patience."

"Their representatives may still be stuck in traffic," said Khalkhali, who was running on a law-and-order platform until bowing out of the race last week because Khomeini frowned on clergymen running for high office.