Iran's military government today ordered a ban on religious processions during next month's Moslem holy period of mourning in an attempt to head off more violent protests against Shah Mohammad Reza Pahlavi.

The government said the ban was aimed at "preventing exploitation of religious groups by those who have caused unpleasant incidents at religious ceremonies in the past."

The move seemed to set the stage for a showdown between the shah's 22-day-old military government and the Moslem holy men who have led much of the popular campaign against his autocratic rule.

Gen. Gholam Reza Azhari, the armed forces chief of staff and a staunch supporter of the Shah, was named prime minister by the monarch to restore order in this strategic and wealthy nation. Generals have vowed that the shah's 440,000-man army will "mercilessly" quell any street protests during the holy month of Moharram, which begins Dec. 2.

The ban on processions coincides with fears that more bloodshed will break out during Moharram, when religious passions in this 93 per cent Shiite Moslem nation traditionally run high. The emotional peak of Moharram is Dec. 11, when the most fervent faithful whip themselves in mourning and remembrance of Jmam Hossein, the grandson of the prophet Mohammed. Hossein was slain in the year 641 by rival Sunni Moslems.

Ayatollah Ruhollah Khomeini, the spiritual leader of Iran's Shiite sect and the shah's bitter foe in exile in Paris, has called for street protests next month and also has urged his followers to disrupt Iran's oil industry, the basis of the nation's economy.

Khomeini and his followers criti the way the shah has tried to modernize this conservative state and are demanding that a government more attuned to Moslem tradition take his place. They have been joined in protests by the shah's political opponents, who seek reforms in his one-man rule.

Continuing tension between the military and the opposition was underlined today in a brief clash between mourners in a funeral procession and soldiers trying to enforce a ban against it. About 3,000 persons were in the procession for Ayatllah Gharavi, a religious leader who died Monday of natural causes.

Troops moved in near the main bazaar, hurling teargas grenades and firing shots.A witness said several persons were hit but he was unable to say how seriously they were hurt.

Most of the mourners scattered but soldiers armed with automatic weapons broke up small groups in narrow lanes near the bazaar.

It was the only violence reported in more than 24 hours, but wildcat strikes at the Tehran refinery shut down the capital's gas stations. The refinery, about 18 miles from the capital, has been the scene of frequent strikes by various groups of workers. Independent sources said about half the staff walked off the job, including tank truck drivers. Army personnel were expected to be moved to break the strike, as they have before.

A second strike that began Sunday at the Shiraz refinery in southwestern Iran was described as 100 percent effective. Reports said it had shut down all gas stations in southern Iran.

The strikers at Shiraz are demanding political concessions from the shah, including release of all persons arrested since martial law was imposed Sept. 8 in 12 major cities.

Production of crude oil was reported back to normal after the 15-day oil industry strike that ended two weeks ago. Independent oil industry sources said 5.7 million barrels of crude were produced Monday and production was expected to hit 6.2 million barrels a day by Friday, better than the prestrike average.

The shah was reported meeting with veteran politicans and other prominent persons, seeking a civilian to head a coalition government.

The shah is expected to name a new government after order is restored. Reliable sources who asked not to be identified said the monarch is leaning toward a nonpolitical figure who would be acceptable to the religious leaders and his political opponents.

Tehran's public prosecutor, meanwhile, began an investigation into allegations that 144 members of Iran's rich elite, including relatives of the shah, have secretly transferred $2.4 billion into foreign bank accounts.

The investigation was launched after striking central bank workers released a list naming 144 persons who the workers charged were diverting a fifth of Iran's oil wealth into bank accounts in the United States, France and Israel.

The five-page list of alleged transfers named two nephews and a niece of the shah, former premier, a senior ambassador and several top ministerial aides.

Political sources said that no ministers from Azhari's government are on the list. The investigation of those whose names reportedly appear on the list was not announced by the state-run radio and there was no indication when it would be completed.