Foreign Minister Karim Sanjabi resigned from Iran's new Islamic government today, criticizig "disorders created by a government within a government."

The resignation, apparently in respose to what Sanjabi saw as interference in governmetn and his ministry's affairs by zealous aides and revolutionary supporters of Ayatollah Ruhollah Khomeini, escalated into what is fast becoming a major government crisis.

In recent weeks Prime Minister Mehdi Bazargan and Justice Minister Assadollah Mobasheri have threatened to quit in disputes growing out of the interference by Khomeini's followers in governmental and judicial affairs.

Potentially more ominous for Khomeini, however, was a statement today by the Islamic guerrilla group, Mujaheddin-e-khalq, switching its support from Khomeini to a liberal religious leader, Ayatollah Mahmoud Taleghani. Telegahani's two sons and a daughter-in-law were arrested last week and reportedly beaten by militiamen of Khomeini's committees.

"Beginning today we will put all our military and political forces at the disposal of Ayatollah Taleghani, with no strings attached," a Mujaheddin statement said.

Thousands of people demonstrated for the second straight day in support of Taleghani, who closed his Tehran office Friday and disappeared into the countryside to protest the 16-hour detention of his relatives, who were said to be members or sympathizers of leftist guerrilla groups.

The Marxist Fedaye guerrillas earlier joined the Mujaheddin in comdemning the arrests.

The Mujaheddin statement called on members throughout the country to support Taleghani and said the organization considered him as the qazis , or chief judge, of the nation.

While the statement did not openly criticize Khomeini or explicitly say the group was no longer backing him, Iranian observers interpreted it as a significant shift in the Mjuaheddin's position. They said that at a minimum, the statement indecated the group no longer recognized Khomeini's predominance over other Shiite Moslem leaders and over the revolutionary government itself.

Recently the Mjuaheddin have been drifting toward the position of the leftist groups. Observers here believe this is because of friction with the militiamen of Khomeini's committees.

Taleghani, who suffered torture during 10 years of imprisonment under the shah, is regarded by the guerrilla groups as the most progressive Shiite leader, or ayatollah, and the one most sympathetic to their goals of creating a "people's army" and a more socialistic system.

Sanjabi today cited the Taleghani incident as a factor that influenced his decision to resign. He called it a "shock not only to the government but to the entire nation" and said it indicated "disorders and groupings even among the strugglers" against the old regime. Sanjabi, 75, was one of the most prominent opponents of the shah.

It has not been unusual during the turmoil that followed the ouster of Shan Mohammad Reza Pahlavi for a comparatively minor event to trigger a major reaction, but the repercussions of the Taleghani incident apparently have taken the Khomeini camp by surprise. Khomeini made no immediate statement on the incident or on Sanjabi's resignation, but an aide in the holy city of Qom said the ayatollah was "giving orders" to solve the problem.

The Cabinet met tonight to discuss Sanjabi's resignation and some observers said he might withdraw it if he were given greater authority in running the Foreign Ministry.

For Sanjabi, Iranian sources said, the main grievance has been what he regards as the interference of Khomeini aides in the affairs of his ministry.

Associates of Sanjabi have complained about the role in foreign policy of Ibrahim Yazdi, the deputy premier in charge of revolutionary affairs.

It was Yazdi, sources said, who invited Palestine Liberation organization leader Yasser Arafat to Iran immediately after the insurrection that overthrew the monarchy in February.

The U.S.-educated Yazdi, a devout Moslem considered one of the more politically radical of Khomeini's close aides, also invited Libyan strongman Muammar Qaddafi, but this was reportedly squelched by Khomeini after protests by Prime Minister Bazargan.

However, a Libyan delegation is now visiting Iran to lay the groundwork for closer ties between the two countries. This visit is believed to have been backed by Yazdi, who wants to strengthen Iran's links with hard-line anti-Israeli Arab governments and guerrilla groups.

Yazdi's influence has also run afoul of the Foreign Ministry on the issue of the Iranian Embassy in Washington. Much to the annoyance of Sanjabi, his aides and some Iranian career diplomats in the United States, Shahriar Rouhani, a graduate student at Yale said here to be Yazdi's son-in-law, has taken over as the de facto ambassador of Iran's new revolutionary government.

Foreign Ministry sources have complained that Rouhani bypasses them in dealing with the Khomeini camp.

Besides Yazdi, another Khomeini aide, Sadegh Ghotbzadeh, National Iranian Radio and Television director, has irritated some government officials and portions of the population. Ghotbzadehi heavily criticized by liberal Iranians for censoring broadcasts to benefit Khomeini and his committees, came under attack in today's demonstrations.

According to Iranian sources, Sanjabi tried to resign in protest a month ago but was dissuaded by Bazargan, who has threatened resignation himself. Las week Justice Minister Mobasheri submitted his resignation to protest the revolutionary trials and executions carried on outside his jurisdiction, but Bazargan persuaded him to stay on.

Meanwhile, revolutionary firing squads today executed eight more former officials condemmed by revolutionary courts for crimes under the shah's regime. That brought the number of officials executed so far to 131.