Iranian Prime Minister Mehdi Bazargan, his government harried by chronic disputes with Ayatollah Ruhollah Khomeini, asked tonight to be fired and indirectly challenged the Moslem religious leader "to come to Tehran and take over the government."

In an unexpected midnight speech broadcast by Iranian television, Bazargan appeared to serve notice that he can no longer tolerate his government's lack of authority and its role as a scapegoat for the opposition generated by the ruling religious leadership.

It was not the first time that the 71-year-old premier had asked to resign, but the startling speech marked the first occasion he had publicly said so -- and to a national radio and television audience.

During the speech, Bazargan strongly indicated that he disagreed with Khomeini's recent policies and the ayatollah's criticism that the government was not acting "in a revolutionary manner."

He challenged his critics to take complaints about his government's inefficiency to Ayatollah Khomeini "and ask him to fire us.

"We know there are people who are more wise and greater statemen than us," he said with a trace of bitter sarcasm. "They should be summoned to take over our jobs."

Bazargan added. "My resignation was submitted to the ayatollah a long time ago. The people should ask him to come to Tehran and take over the government."

Khomeini established his base in the holy city of Qom, 100 miles south of Tehran, after the February revolution that toppled Shah Monammad Reza Pahlavi. The ayatollah appointed Bazargan to head a provisional government, but he and other clergymen retain ultimate authority.

Bazargan said he would gladly quit his job, which he termed "a thankless task." He said "I am not holding onto the premier's chair with both my hands. If we leave this office it would be like a second wedding."

Observers said the premier, who on previous occasions had always been persuaded by Ayatollah Khomeini that "his mandate was from God" and that he could not quit, now appeared to feel that matters had gone too far.

They said the premier had been forced to witness the destruction of his ideals of democracy and freedom -- goals he fought for during the rule of the deposed shah -- and now felt unable to do anything to stem Iran's drift into a theocratic dictatorship.

"I accept the accusation that we have not acted in a revolutionary manner it if means disregarding laws and going against all international standards," he said in his strongest rebuff of Khomeini.

The prime minister, who was replying to mounting criticism of his government for its weakness and indecisiveness, said his administration had come to be blamed for everything without receiving credit for any achievements.

He said that if he confused to remain silent in face of this criticism, "it would be considered accepting it."

"The instrument that we have for governing the country is not unlike a knife without a sharp blade," the premier said, his voice frequently rising in anger.

Bazargan said the mandate given to him by Khomeini while the ayatollah was in exile in Paris last January was to regularize the affairs of state, revive the oil industry and allow the people to put "their shoulder to the wheel after the revolution.

"But much of this was not achieved. Responsibilities became divided and there was confusion all around," he said.

Observers said Bazargan's offer to resign might also have been prompted by pressure from the radical clergy, who have shown a desire to take over the entire running of the government for some time.

Political analysts said they could not understand how Bazargan had managed to remain silent for so long as Iran slipped into a state of rebellion against the clergy's growing authoritarianism.

It seemed likely that Khomeini would have to accept Bazargan's resignation this time or suffer a serious loss of face, since the premier made his offer directly to the nation instead of the ayatollah as on previous occasions.

Less certain was whether the ayatollah would permit the clergy to fully take over the government. Khomeini is believed to be aware of the difficulties the clergy would encounter in trying to run an administration.

Observers said that as a replacement for Bazargan, the ayatollah might turn to the National Iranian Oil Co. chairman Hassan Nazih, or the Navy chief and governor of Khuzestan Province, Rear Adm. Ahmad Madani. Both men are considered strong personalities who would try to impose their authority.