Tens of thousands of Iranians shouting pro-shah and pro-government slogans today demonstrated in a show of force here designed to strengthen Prime Minister Shahpour Bakhtiar's hand in his army-backed confrontation with exiled Ayatollah Ruhollah Khomeini.

The march served as a backdrop for behind-the-scenes contacts here and in Paris aimed at averting further violence that could destroy the last vestiges of Iran's functioning state institutions.

The new orders closing Tehran's airport until Sunday provided both sides a breathing spell as Khomeini reflected on Bakhtiar's offer that sources here said included major concessions if the Moslem leader forsook immediate establishment of an Islamic republic and postponed his return for three weeks.

[Bakhtiar told a Paris radio station that he had asked Khomeini to put off his return "for a few days" and the anyatollah's aides confirmed this was a main point in Bakhtiar's offer.]

The Bakhtiar government, in an apparent muscleflexing exercise, renewed a strict martial law ban on all demonstrations beginning Friday. This seemed designed to counter Khomeini's call from Paris for major demonstrations Friday to protest the airport closing that delayed his return.

Prominent religious leaders here warned of major disturbances if Bakhtiar tries to keep Khomeini from returning Sunday. Unless the opposition leader comes home then, Ayatollah Hasrat Shirazi of the northeastern city of Mashad said pointedly he would issue orders for his followers to "remove impediments preventing" the 78-year-old ayatollah from ending his 14-year exile.

In a letter dispatched yesterday to Paris, sources said Bakhtiar told Khomeini his return now could "throw the country into an unprecedented major national crisis" and at "this crucial stage face the governmet with a critical situation, the consequences of which I will not accept."

That veiled warning of an army takeover was coupled with Bakhtiar's willingness to accept changes "based on democratic traditions," but rejection of "methods of introducing changes through other channels."

That was a clear allusion to Khomeini's desire to set up an Islamic revolutionary council and provisional government to push through a referendum designed to turn Iran from a monarchy into his dream of an Islamic republic.

If Khomeini reconsiders his reported rejection of Bakhtiar's request not to establish the provisional Islamic goverment, the prime minister offered to resign and call an election for a constituent assembly.

That body would determine what future form of government Iran should have -- the present monarchy, Khomeini's Islamic republic or a plain republic favored by many Iranians frightened by the theocratic implications of the ayatollah's project.

Although all concerned were privately relieved at the breathing space afforded by the airport closure, some observers here suggested Bakhtiar and senior military commanders were locked in a complicated power struggle.

Circumstantial evidence buttressing such a thesis reposes on Bakhtiar's promise yesterday afternoon to reopen the airport this morning, a decision reversed at midnight, and the fact that the renewed closedown was ussued by the martial law administrator, not the more appropriate civil aviation authorities.

Spokesmen for the committee which had hoped to welcome Khomeini from Paris Friday morning accused the government of "psychological warfare" and "desperately postponing" the exile's return after 14 years' absence.

But they and other religious and opposition leaders made it clear at a news conference that they were willing to wait another 72 hours before any new course of action, which many fear could mean widespread violence if Khomeini is again frustrated from returning.

"We will try to invite people [to remain calm] for the next two to three days," organizers said. "But the people have been so excited we do not know how effective our advice will be."

Evidently bouyed by the largest turnout for a progovernment meeting in a year -- a visit to the grave of Mohammed Mossadegh, the nationalist symbol and former prime minister -- Bakhtiar announced a ban on all further demonstrations under martial law provisions he had skirted for his own rally. Similar pro-government rallies also were reported held in the provincial cities of Ahwaz, Birjand and Kermanshah.

Denounced by the Moslem clergy as a government-backed operation, the really gathered in the square opposite parliament amid a forest of large, red, white and green Iranian flags and smaller paper ones carried by often smartly turned out marchers. They included many girls and women who refused to veil their heads as has once again become Moslem practice under Khomeini's influence.

Significant numbers of middle-class Iranians who had marched in anti-shah demonstrations in December took part today to drive home one of the rally's main themes -- the fear of replacing the shah's dictatorship with another in the form of Khomeini's Islamic republic.

From start to finish, the marchers were protected by police and soldiers from pro-Khomeini hecklers who accused the less well dressed marchers of being paid to demonstrate.

Factory manager Mohsen Sayer typified anguish felt by many middle-class marchers:

"We've been fighting for the constitution for 25 years and so has Bakhtiar," he said. "I walked in both December marches, but now it's time for the majority of Iranians to say what they want as democrats."

"We don't know what Khomeini really means by his Islamic republic," he added, "and we are dead scared. We want the issues clarified, the people given time to absorb information after the shah's dictatorship and we want real choice."

He confessed that the weakness of his argument as a member of "the silent party, just sitting at home, listening to the news and fretting," was that it was not yet "the silent majority."

"There are many uneducated people in this country," he lamented, "and they will be for Khomeini and his Islamic republic and as a democrat I must repect them, for they are the majority."