Ayatollah Ruhollah Khomeini today ordered that independent foreign observers be allowed to visit the 50 hostages being held inside the U.S. Embassy here and that an international commission be set up to investigate "American crimes" in Iran.

The moves appeared to open the way for a lessening of tension with the United States and possibly an eventual solution of the 40-day-old hostages crisis. Khomeini said he was ordering the visits "to confront the agressive and false American propaganda" on the conditions of the hostages' detention.

The 79-year-old ayatollah's orders were immediately accepted publicly by the radical Islamic students who seized the embassy Nov. 4.

The student's agreement was considered important since in the past they have effectively vetoed various similar suggestions, limited visits to some of the hostages and insisted that their release depends solely on the extradition of the deposed shah, Mohammad Reza Pahlavi.

It was not immediately made clear who the visitors would be or when they would be allowed to see the hostages. Nor was it known who would sit on Khomeini's investigative commission. The ambassadors of 12 Western countries met today with Foreign Minister Sadegh Ghotbazadeh, but diplomatic sources maintained afterward that the meeting was not related to visiting the hostages.

[In Washington, White House press secretary Jody Powell said any observers must be internationally recognized and impartial and see all the hostages, checking on them frequently, or the visit would amount to no more than a "cynical" diversionary tactic.]

In the troubled northwestern region of Azerbaijan, meanwhile, several hundreds thousand people marched through the provincial capital of Tabriz to show their support for Khomeini's chief rival. Ayatollah Kazem Shariatmadari, and call for changes in Khomeini's newly approved Islamic constitution.

Foreign Minister Ghotbzadeh last Friday broached the idea for establishing a form of Iranian-appointed international grand jury to determine overall U.S. responsibility in the shah's alleged crimes and to decide which of the hostages were to be freed outright and which would face spy trials.

Iranian officials have never set a date for the trials.

Although he recently held out hope that "independent international observers" could visit the hostages "in a very short time," Ghotbzadeh than discouraged suggestions that resident foreign diplomats might be allowed to enter the embassy and see their colleagues.

"It is essential that we form as soon as possible an international investigative commission, in consultation with the Revolutionary Council, to study the aggressive policies of Americans in Iran, in particular during the rule of the deposed traitor shah," Khomeini's orders to Ghotbzadeh read. Khomeini said the commission would put the charges "before real public opinion so that international organizations which, under U.S. control, have condemned Iran, become better informed about American crimes against our people."

The ayatollah's wording suggested for the first time a realization on his part that Iran's decision to boycott the United Nations Security Council and the International Court of Justice might be proving counterproductive.

"Furthermore, to counter aggressive and false American propaganda in connection with the hostages in the den of spies," as the regime calls the U.S. Embassy, "you can invite an independent international delegation to visit them," Khomeini added.

That wording also reflected continuing American and international disapproval of the hostages' conditions of detention, under which their hands are kept tied and they are forbidden to talk to one each other.

Analysts here believe major Western candidates for the Iranian grand jury would be reluctant to serve if, as seems Iran's intention, it becomes a show trial to denounce the United States.

The analysts noted the ayatollah had mentioned forming the grand jury-style commission "as soon as possible" while Ghotbzadeh last week said that "it would be formed within 10 days."

Despite Ghotbzadeh's efforts to discourage the resident diplomats' hopes of visiting their detained American colleagues, the diplomatic community was reported involved intense consultations, in the belief that some of its members might be allowed to enter the U.S. Embassy.

The last diplomats to visit the hostages were a four-man delegation on Nov. 10, followed several days later by Msgr. Annibale Bugnini, a papal nuncio.

Two weeks later, Rep. George V. Hansen (R-Idaho) was allowed into the embassy. He visited fewer than 20 hostages. This raised fears that some hostages had been moved out of the 27-acre embassy compound.

Meanwhile, central government authority was openly challenged today in turbulent provinces of Kurdistan and Azerbaijan as well as in the capital itself.

Participating in a massive, morning-long demonstration in Tabriz were several hundred uniformed Army troops with half a dozen officers.

Although the demonstrators shouted both Shariatmadari's and Khomeini's names, they gave the clear impression that their loyalties lay with the former.

"In our class we have decided that if Khomeini did these things, it is bad," a schoolteacher said, ticking off Azerbaijani complaints about central government high-handedness, violence and intolerance. "And if he did not know about them, it is worse."

A central government delegation led by Finance Minister Abol Hassan Bani-Sadr flew back to Tehran to report on a fact-finding mission on the recent unrest in the province. The delegation was told by Azerbaijanis that Shariatmadari's views should be respected "not only in matters relating to Azerbaijan, but in all affairs of the country," as his local representatives put it.

In the Kurdish city of Mahabad, negotiations to discuss Kurdish demands for autonomy were broken off when a government delegation returned to Tehran.

According to Kurdish sources, the government negotiators never addressed themselves to the autonomy demand and indeed tried to go back on an earlier agreement accepting radical leftist representatives on the Kurdish negotiating delegation.

Despite the interruption of negotiations, Kurdish sources expressed hopes that full-scale hostilities would not neccessarily break out when a 20-day cease fire expires Friday.