Relations between the Soviet Union and Iraq, one of Moscow's closest allies in the Arab world, appear to have deteriorated sharply in recent weeks.

Iraq has confirmed the execution of 21 Communist Party members accused of illegal political activity on behalf of Moscow, and has made public its objection to some Soviet policies in Africa. Reports circulating in the Middle East and in Washington indicate that these disputes have brought Soviet-Iran realtions to their lowest point in years.

An open break with Iraq could be major foreign policy setback for the Soviets, who have watched the steady erosion in this decade of their once-dominant position of influence in the Arab world.

Egypt, the Sudan, Somalia and to a lesser extent North Yemen have moved out of the Soviet orbit and even Iraq's allegiance had become military and stategic then ideological.

Speculation that Iraq is planning to break relations with Moscow or to abrogate its treaty of friendship with the Soviet Union has been dismissed by a prominent Iraqi official confirmed, however, that the executions have been carried out and that Iraj objected to Soviet support for Ethiopia's attempt to crush a secessionist rebellion in Eritrea indicating that reports of a chill in Iraqi-Soviet relations are accurate.

Soviet Foreign Minister Andrei Gromyko met his Iraqi counterpart, Dr. Saadoun Hammadi, at the United Nations on May 30 to discuss bilateral relations. The Iraqi press reported the meeting without comment, but Radio Moscow said Iraqi-Soviet ties "are developing favorably on the sound basis" of their 1972 treaty of friendship and cooperation.

In fact, strains appeared in the relationship less than two years after the treaty was signed when it became clear that the Soviet Union would support a negotiated peace agreement between the Arabs and Israel - something Iraq unalterably opposes.

The Soviet Union continued to supply Iraq with missiles, combat jets and other weapons and gave Iraq vital assistance in suppressing a rebellion among its Kurdish minority in the north. Yet there have been many issues on which the Iraqis were openly unhappy with Soviet policies and actions.

Iraq complained when Moscow allowed some Soviet Jews to emigrate to Israel. The Iraqis were furious when the Russians helped Iraq's implacable ideological rival, Syria, build a dam on the Eurphrates River that reduced the water supply on Iraqi farms. Iraq reportedly felt that the Soviets reneged on their commitment to the Palestinians when Moscow failed to act during the recent Israeli invasion of south Lebanon.

The latest disputes, which precipitated what some analysts describe as a crisis in Soviet-Iraqi relations, involved Communist political activity in the Iraqi armed forces, an old sore point, and Soviet support for the Marxist government in Addis Ababa as it seeks to crush the Iraqi-supported Eritrean rebellion.

In an interview in Baghdad last week with Washington Post staff writer J.P. Smith, Niam Haddad, a senior member of the Iraqi leadership, said his country had "contacted the Soviet Union and Cuba and explained the truth of our position."

He said that Iraq, which supports the Eritreans as Muslems and Arabs fighting to free themselves from alien occupation, had asked for, and received, assurances that the Soviets would not participate militarily in the Eritrean campaign.

Soviet military personnel took part directly in Ethiopia's counteroffensive against Somali rebels in the Ogaden region, but Haddad said that "the Ogaden is entirely different from Eritrea. Eritrea is Arab land."

A Kuwaiti newspaper published a report by its Baghdad correspondent last month saying Iraq threatened to break relations with Moscow over this issue, but Haddad denied that. "That was no threat of severing relations. We expressed our concern," he said.

Haddad is secretary general of National Progressive Front, a grouping of pokitical parties, including the Communists, that rules the country under the domination of the Baath Socialist Party.

He told a Reuter correspondent that "as far as we are concerned, our strategic alliance with the Soviet Union will not change. The Soviet Union is a friend with whom we can collaborate, on condition that there is no interference in our internal affairs."

This was a reference to the execution of the 21 Communists, which he confirmed a week after reports began to filter out of Iraq.

He said that the Communists had violated a longstanding rule against political organizing activities in the Iraqi armed forces by anyone expect Baath cadres. There is no issue, except perhaps that of Israel on which the Iraqi rulers are more sensitive than this.

There are two Communists in the Iraqi cabinet, but the Baathist rule the country. Reports of a crackdown on the Iraqi Communists have been circulating for some time, and Haddad observed that the Iraqi Party "follows the Soviet Communist Party like a tail."