In a little more than a year, Ayatollah Ruhollah Khomeini has gone from a prophet literally preaching in the desert to a political force capable of mobilizing millions and chasing the shah from Iran.

It was fashionable until the last year for all but the deeply religious in Iran to dismiss him as an embittered old Moslem exile seething with bile.

Then, as 1978 wore on, Khomeini said march and the Iranians marched, strike and they struck. He ran roughshod over the shah, other once-prestigious religious leaders and his allies in the lay political opposition alike.

Portraits of the gaunt, gray-bearded cleric decorate car windshields and store windows. His name adorns hospitals, schools, mosques, even the monument in Tehran the shah built to himself and to Iran's 2,500 years of monarchy, which Khomeini now wants replaced with an Islamic republic.

His ascension owes its success to the shah's blunders and to Khomeini's uncompromising opposition, his old time religious appeals to fundamental values threatened by excessive Westernization, and the glamour of exile.

Now that the moment of truth is fast approaching and Khomeini is about to face the challenge of responsibility of power, many of the key lay and religious Iranians who helped him are having serious second thoughts about his unbending and autocratic ways.

Suddenly the badges of exile -- abnegation, distance and intransigence -- are seen as defects when it comes to trying to run a complex country in transition that neither Khomeini nor his long-exiled disciples are likely to recognize, much less understand.

Sometimes called Iran's Mahatma Gandhi, Khomeini does not intimately understand his rapidly changing society the way the Indian leader understood his country in leading it to independence.

In the 14 years since he exiled Khomeini, the shah transformed Iran so thoroughly that little familiar remains for Khomeini.

The religious, the lay, the left, the liberals, the right, everyone who was fed up with the shah used Khomeini, nonetheless, as a convenient, if distant symbol of a strong man who for years openly opposed the monarchy when they did not.

If there is a single constant in Khomeini's thinking -- contained in sermons, statements and about 30 published books -- it is a deep-seated sense of Iranian nationalism and suspicion of foreign powers seen as exploiting his country.

"All the problems baeetting Iran and other Islamic nations are the doings of the aliens of the United States," he said in a fiery sermon in 1964, climaxing several years of attacks on the shah, which led to his exile.

The cause of his ire then was parliamentary approval for a status-of-forces agreement exempting U.S. military personnel serving in Iran from the jurisdiction of Iranian courts.

That was, to Khomeini, the last straw of American interference in Iran, which began in earnest in 1953 when the Central Intelligence Agency helped engineer a coup against the nationalist government of Prime Minister Mohammad Mossadegh, putting the shah back on the throne.

The Americans were seen as continuing in the evil tradition of the British and Russians who divided the country into spheres of influence early in this century, before occupying it during World War II.

Khomeini was no less outspoken in his condemnation of Israel, considered along with the United States an ally of the shah and a force of the Islamic world.

Khomeini's increasingly shrill attacks against Israel turned him into an early defender of the Palestinian cause and even his Iranian admirers worried at his occasional failure to differentiate between Jews and Zionists in his attacks.

Compared to his early firebrand language, Khomeini's pronouncements now seem greatly watered down.

Khomeini took his surname from his hometown of Khomein, a common practice among ayatollahs, or Shiite Islamic religious leaders, whose title means "reflection of God." He was born in 1900.

His grandfather, born in Kashmir, immigrated to Iran. His father, a minor religious cleric, died when Khomeini was 1. He attended religious school in Khomein, then at 16 moved to Arak for further Islamic instruction.

He later moved to Qom, one of Iran's holy cities and a major center of Islamic learning.

Married in 1927 to the daughter of a Tehran theological figure, Khoemini fathered three daughters and two sons.

SAVAK, the secret police, was accused of responsibility in the mysterious death of one son, but no evidence was produced.

Khomeini quickly made his mark as a religious figure and first became known through his writings for piety and scholarship.

By the early 1960s, Khomeini was making increasingly harsh shrill attacks on the shah and warning of what he saw as the dangerously growing American and Israeli influence in Iran.

Although government propagandists have depicted him as opposed to the land reform and women's emancipation moves of that period, Iranian historians say this was only a secondary theme for Khomeini.

Khomeini's first arrest was on the eve of the January 1963 referendum that endorsed these and other modernizations the shah imposed.

The Shiite clergy was a major landowner and some of its opposition was based on defending its interest threatened by the land reforms.

In June 1963, Khomeini was arrested in Qom for preaching anti-shah sermons that helped spark massive riots in Tehran that were put down with severity.

Opposition sources estimated that as many as 7,000 people were killed then, more than have died in protests over the past year.

SAVAK reportedly wanted to execute Khomeini in 1963. ut Ayatollah Kazem Shariatmadari intervened, insisting that ayatollahs could not be subject to capital punishment. Khomeini was released in August.

Shariatmadari invoked the same reasoning two months later when Khomeini was arrested again, this time for charging that parliamentary elections had been rigged.

The final arrest took place at the time of the parliamentary debate on the status of U.S. forces a year later. Gen. Hassan Pakravan, the SAVAK chief, exiled him to Turkey.

Khomeini moved from Turkey to Najjam, one of Shiite Islam's most holy shrines, in the desert of southern Iraq.

There he headed a theological school and remained in vague touch with Iranian developments through the trickle of Iranian pilgrims allowed to visit Najjam.

From time to time his voice was heard. In 1971 he denounced as megalomanical and extravagant the shah's multimillion-dollar celebration in Persepolis of 2,500 years of Persian monarchy and of the shah's Pahlavi dynasty.

Except for the government's blunder in having an anti-Khomeini article published in Iranian newspapers in January 1978, the ayatollah might still be in Iraq.

But so much anger was engendered among the religious by the article that riots followed and police and army overreacted. The first victims of Iran's year of anti-shah violence died in those riots in Qom. Then, in riots in Tabriz in February, the army shot more than a hundred demonstrators.

Fresh outbreaks of violence during the summer of 1975 brought martial law and the first changes in the makeup of Iran's government.

In October, Iraq, possibly at Iranian suggestion, possiblty worried about Khomeini's spellbinding influence on its own sizable Shiite minority, surrounded his house in Najjam and cut his telephone wire.

Khomein left for France where, instead of falling further into oblivion, he soon discovered the advantages of direct dial telephone service to Iran, the attention of the world press and the adulation of Iranians from all over the world.

For the first time he spelled out in some detail his program for establishing an Islamic republic. Far from signaling a return to the Middle Ages, as the shah's propagandists had claimed, this program was portrayed by Khomeini as an effort to reconcile Islam and the contemporary world.

Khomeini disputes charges that he is surrounded by dangerous Communists and extreme leftists and has consistently denied he would tolerate any links with the growing numbers of Marxists in Iran.

Analysts have been hard-pressed to see how his Islamic republic can solve the problems of a transitional society, especially now that the political and economic situation in Iran seems all but out of control.

One distinguished Iranian historian of Islam, who wished to remain anonymous, is doubtful about Khomeini's ability to deal with modern problems and issues.

Asked if he was acquainted with Khomeini, the historian said: "I've never actually met him, but I feel I have known him for nearly 1,300 years" -- a suggestion that Khomeini's reasoning had progressed little from the old bedrock original model.