In a stunning victory for opponents of President Anwar Sadat, Arab countries meeting here agreed today to impose a total economic boycott on Egypt. They also are recalling their ambassadors immediately and are to break diplomatic relations within a month.

The sweeping sanctions were accepted unanimously by the 19 delegations at a conference of Arab foreign and economic ministers. Only Sudan and Oman, allies of Egypt who stayed away from the meeting, failed to join in the Arab decisions.

Saudi Arabia, a strategic partner of the United States and a major financial supporter of Egypt, yielded to heavy pressure from other delegations and joined in sanctions against egypt that go far beyond what the Saudis originally wanted.

The cumulative effect of the resolutions is strong condemnation of Sadat's action in signing a peace treaty with Israel. The decisions and the Saudi participation in them go far beyond what egypt was expecting and are likely to contribute to a malaise in Egypt over the totality of the country's split with the rest of the Arab world.

The Saudi decision to join the total blacklist of Egyupt reportedly was made by King Khalid himself when delegates here urged the Saudi foreign minister, Prince Saud, to put the issue before him.

Even if the resolution are never fully carried out or if they do not cause economic disruption in Egypt, they represent a major policy failure for both Egypt and the United States. The United States has made direct appeals to Saudi Arabia and Jordan to give Sadat's program a chance, and the Egyptians had been counting on back-door Saudi tolerance of what they were doing to entice some Palestinians into the proposed negotiations on autonomy for Israeli-occupied territories.

(There was no immediate comment in Cairo because offices were closed to allow all Egyptians to join in welcoming home Sadat. In Washington, a State Department spokesman said the department wanted more information about what the Arab countries agreed to and there would be no immediate U.S. comment, Reuter reported.)

Iraqi Foreign Minister Saadoun Hamadi, who announced the Resolutions after a heated five-day conference, said they are not recommendations but binding decisions. The only room for maneuver, he said, is on the question of severing diplomatic relations. An ambiguity in the arabic text referred to this as a "recommendation" but also said it was a "decision" to be carried out wihin 30 days.

Conference participants said there was no doubt that all countries had agreed to cut diplomatic ties but that there was a time lapse permitted because the ministers did not have the legal power to bind their governments.

Even if this constitutes a loophole that will permit some Arab States to maintain token diplomatic contacts with Egypt, the Arabs achieve dthe unanimity that has eluded them in several previous attempts to arrive at a combined strategy for dealing with Sadat.

Ever since Sadat shocked the Arab world by traveling to Jerusalem in November 1977, the Arabs have been split between hard-liners trying to bring sadat down and moderates adopting a wait-and-see attitude.

Among the latter were Saudi Arabia and Jordan, who have now thrown in their lot withu the dedicated opponents of the Egyptian president.

It appears that Sadat, who had been expecting not support but at least silence from the pro-Western Arab states, underestimated the scope of Arba opposition to his signature of the treaty and overestimated the ability and determination of his former friends to forestall harsh sanctions.

Abdel Mohsen Abu Mayzer, spokesman for the Palestine Liberation organization, hailed the conference resolutions as a "great victory," representing "the beginning, not the end," of the PLO's campaign against Sadat.

Hamadi, the Iraqi minister, said the resolutions represented a "minimum level" of acceptable sanctions and said individual countries might go further.

If further implemented, the sanctions could have considerable impact on the fragile Egyptian economy and on its military development. Egypt is prepared to survive a rupture of diplomatic relations, but the economic sanctions are another matter.

Saudi Arabia and Kuwait alone have contributed almost $300 million in cash assistance yearly and millions more in other forms of aid. That would end under the resolutions. But the implications of the sanctions go beyond that.

The Arab countries committed themselves to stop selling petroleum products to Egypt. While Egypt exports crude oil, it imports jet fuel and other refined products. Even if non-Arab supplies are available there will be disruption of supply patterns and probably added costs.

It will be some time before it is clear what specific acts the Arab states will take in carrying out the principles adopted here. Hamadi suggested, for example, that Arab ships would continue to use the Suez Canal and he said the question of commercial arilines service to Egypt would be decided by a follow-up committee.

One crucial unanswered question was whether Saudi Arabia is backing out of its $525 million contract to pay for 50 american combat jets that Egypt is expecting to receive this year.

Spokesman Hamadi said that contract was "definitely" affected but he also said the decisions were effective as of the date of the signing of the peace treaty and the Saudi commitment on the aircraft precedes that. The Saudi delegation left baghdad immediately after the meeting and was not available for clarification.

Earlier in the week, the conference appeared honestly split over how far to go in punishing Egypt. The Saudis argued that they were not authorized to go beyond relatively mild sanctions against Egypt already approved and that anything more would require a summit meeting. Aligned against them were Iraq, Syria, Libya, the PLO and several countries formerly in the moderate camp who said that the time for halfway measures had passed.

Conference sources said the Saudis were worn down by a strong appeal from Kuwait, open criticism from the PLO and a direct challenge by the Iraqis, who were saying that anyone failing to break completely with Egypt was collaborating with Sadat.

As read by Hamadi, the resolutions call for immediate withdrawal of those Arab ambassadors still in Cairo, a break in diplomatic and consular relations in a month, suspension of Egyptian membership in the Arab League and "temporary" transfer of the league headquarters to Tunis.

Other resolutions call on the Organization of African Unity and the nonaligned movement to suspend Egyptian membership, condemn U.S. Middle East policy, seek cutoff of any economic, financial or technical aid to egypt, ban Arab purchase of Egyptian securities, boycott firms doing business with Egypt, and appeal to the United Nations to move its regional offices out of Egypt.

The precise details of the application of the economic boycott are to be worked out by the Arab League boycott office in Damascus, Syria, Hamadi said.

No action would be taken against individual Egyptians working in other Arab countries, Hamadi said, and no attempt would be made to prevent them from sending their earnings home. That means that at least one major component of Egypt's earnings from and ties with the Arab world would not be affected.