Secretary of State Edmund S. Muskie, after a lengthy meeting with Soviet Foreign Minister Andrei Gromyko, said today the positions of the two countries were similar regarding the fighting between Iraq and Iran. He held out hope for tacit Soviet-American cooperation to avoid a wider conflict.

Muskie indicated to reporters that explicit agreements between the two superpowers were unlikely, given the poor state of their relations in recent months. But he noted, "By exchanging views, two people may follow parallel courses of action without reaching agreement."

[Late yesterday, the U.N. Security Council agreed to hold its first public meeting on the war between Iran and Iraq at 5 p.m. today, the Associated Press reported.]

[The 15 council members agreed on thais after engaging in intermittent private talks throughout the day on what to do next to deal with the continuing hostilities.]

[Amid the talks, Secretary General Kurt Waldheim wrote Security Council President Taieb Slim of Tunisia, "I feel obliged to request that the Security Council consider this matter with the utmost urgency."]

Muskie and Gromyko reached formal accord on only one point, the start of preliminary discussions on the limitation of medium-range missiles in Europe. They agreed, as expected, that U.S. and Soviet negotiators will meet in Geneva the week beginning Oct. 13. The two sides will express their still differing views of the scope of a formal negotiation, Muskie said. t

Muskie and Gromkyo also exchanged views at length about Afghanistan in the 3 1/2-hour conference, which Muskie called "very frank" and "hard hitting . . . but not abusive." There was no breakthrough on the question of a Soviet withdrawal from Afghanistan, U.S. officials said.

It is the Iraq-Iran crisis, more than any other, that has engaged the energy of the world's senior foreign ministers here this week, and exploration of the Soviet attitude toward it was a key Muskie goal.

Under a rule of confidentiality -- extracted by Gromyko -- Muskie was leery of saying much about the Soviet position. On the steps of the Soviet mission immediately after the meeting, he said, "We seem to be taking the same view with respect to the role of the United States and the U.S.S.R. [in the Iraq-Iran ciris]. In other words we are both apparently in a neural position."

Speaking to reporters later, Muskie said he had told Gromyko that the U.S. was supporting a meeting of the U.N. Security Council to aid the resolution of the crisis, and would use U.S. diplomatic channels to bring pleas for a resolution to many countries.

Gromyko "did not respond or reject the Security Council or the diplomatic offensive idea," Muskie said.

Other sources said Gromyko told Muskie -- as he reportedly told other Western foreign ministers here -- that the Soviet Union was not involved in starting the hostilities between Iraq and Iran and that it had no desire to prolong the fighting.

Gromyko is reported to have told a senior Western diplomat that the Soviet Union was for freedom of passage through maritime channels -- a reference of the sensitive petroleum choke point of the Persian Gulf, the Straits of Hormuz.

On the diplomatic front, Muskie said the United States is not in a position to take a public lead partly because of the plight of the 52 American hostages in Tehran.

Muskie's discussion of Persian Gulf diplomacy continued late today in a hour-long meeting with the Saudi foreign minister, Prince Saud Faisal. The Saudi official has been involved in discussions about an initiative to be taken by Islamic states in an effort to resolve the crisis.

[The first signs of some serious mediation to the conflict appeared at the United Nations late yesterday, with the lead being taken by the 40-nation Islamic group, United Press International recorded.]

[U.N. diplomatic sources said Security Council President Slim sent a note to presidents Abol Hassan Bani-Sadr of Iran and Saddam Hussein of Iraq asking whether they would agree to mediation by the Islamic group, UPI said.]

[But Pakistani diplomatic sources said reports that the two countries had actually accepted Islamic mediation were "premature," a view echoed by Waldheim, UPI reported.]

Muskie, reflecting lengthy unannounced discussions between himself and the British, French and West German foreign ministers in the last several days, was extremely cautious in responding to questions about plans for joint military action in case Iran attempts to block that strategic channel.

So far, Muskie noted, Iran has declared the waters within its 12-mile territorial limit a war zone and has hailed "a couple of ships" in an apparent effort to create uncertainty and thus inhibit shipping.

"Obviously that's not sufficient to generate, to trigger a military response. So you have to watch what happens. The Iranians may not go beyond that," Muskie said.

There was no effort to gloss over the grave dangers of the current conflict to the world's petroleum lifeline or the danger that the fighting may spread to nearby nations or even the great powers.

Asked by a reporter what the Soviet Union had to lose in a continuation of the battle, Muskie replied, "The whole world stands to lose . . . when hostilities erupt whch could escalate even to the point when the ultimate unthinkable hostilities may take place . . . I doubt if the Russians have lost that perspective. I am sure we haven't."

As of now, he said, he does not expect the war in the Persian Gulf to escalate to an "unthinkable" level involving U.S.-Soviet confrontation because of the sober attitudes and perceptions of many nations, including the superpowers.

The Muskie-Gromyko meeting was the second for the two men, who met May 16 in Vienna. There was no hint of rapport, personal or political, in either session.

Speaking of the state of Soviet-American relations fault with each other's policies. . . . We have stepped back from the days of maximum accommodation" and it will be "a long, slow process" to rebuild the relationship.

As in Vienna four months ago Gromyko did not make his hitherto customary joint statement, even of a perfunctory nature with the Secretary of State after their meeting.

Gromyko escorted Muskie to the front steps of the Soviet mission to the United Nations and, as journalists shouted appeals that he answer questions, Gromyko turned on his heel and strode back inside.