Iranian Prime Minister Mehdi Bazargan was pushed to the brink of resignation today by mounting criticism from Ayatollah Ruhollah Khomeini, who attacked his handpicked prime minister and the government as "weak."

Despite perfunctory denials, it was clear that Bazargan was deeply unhappy at his unraveling fortune.

Khomeini also attacked Bazargan and his ministers for believing "everything should be copied from the West." His admonition -- "You are weak, Mister, you must be strong" -- was delivered from the holy Shiite Moslem city of Qom, where Iran's unofficial head of state established himself a week ago.

Despite government hopes then that he would Withdraw from involvement in day-to-day politics, Khomeini has issued almost daily pronouncements that have further undercut Bazargan's authority.

As has been the case recently, the theme today was condemnation of Western influence, which Khomeini believes must be rooted out to fulfill his increasingly contested dreams of turning Iran into an Islamic republic.

At the same time the revolutionary courts, which Bazargan had repeatedly condemned and promised to bring to an end, continued their activities.

The latest victims were six men accused of homosexual rape and executed by firing squad less than 24 hours after arrest. The total execution orders by revolutionary tribunal now exceed 30.

The combination Khomeini's repeated intervention and the revolutionary tribunal's letha activity clearly has pushed Bazargan to the brink of resigning.

Bazargan's latest rumored resignation was reportedly sparked by the arrest Saturday of a member of parliament, Ahmad Baniahmad, the leader from Tabriz who was one of the few parliamentarians with a real claim to opposition to Shah Mohammad Reza Pahlavi.

Baniahmad was arrested on his way to an appointment with Bazargan by militiamen guarding the prime minister's office. He has remained in Qasrprison despite Bazargan's repeated efforts to free him.

Bazargan's first public threat to resign came one week ago when he criticized both the arbitrary behavior of revolutionary committees throughout the country and the left accused of seeking to subvert the army.

Khomeini's pronouncement today contained an almost hysterically populist tone.

"The ministries are just as they were under the former regime," he said, "The nation lives in caves and you are in the prime minister's office... and nothing has changed -- carpets, furniture and Western trappings should all go."

The developing conflict between Bazargan and Khomeini is a dramatic symptom of a polarization between Islamic fundamentalism and the moderate liberal position which has developed much faster than anyone expected.

The irony is that Bazargan, the country's most experienced and realistic Moslem politician, has already found himself in opposition to Khomeini, who chose him as prime minister just a month ago.

Bazargan is torn between his former partron and the liberal and leftwing groups who are also moving into opposition to the government.

These include not only the left-wing radical groups, but also such centrist liberals as Heydattollah Matine-Daftari, who Monday used the anniversary of the death of his grandfather, anti-shah nationalist Mohamed Mossadegh to throw down the gauntlet before an estimated million Iranians.

In launching his new "National Democratic Front" -- a variation of Mossadegh's own National Front -- Matine-Daftarl came closer than any politician so far to openly challenging Khomeini's stand in favor of an exclusively Islamic republic.

He did so by advocating complete freedom of the press, assembly, trade unions, equality between the sexes. He thus articulated the growing resentment, particularly among the educated middle class, against Khomeini's increasingly erratic, but usually extreme demands.

These demands have included that women in ministries be "properly dressed," meaning at least a headscarf and perhaps a full-length chador, a ban on frozen meat and his followers' attacks on abortion, bank interest and co-education.

Despite his thunderings from Qom, Khomeini has found it expedient to backtrack on several occasions -- such as women's right to divorce.

But the current focus of the struggle is sexual equality and two demonstrations have been scheduled for International Women's Day at Tehran University.