Domestic and foreign policy considerations rather than military reasons are believed to be dictating Iraq's relative restraint in its current border disturbances with Iraq.

Iraq, according to diplomatic observers, feels that Iranian President Abol Hassan Bani-Sadr needs the border tensions as a public distraction to allow him to strenghthen his government and prevent a collapse that could lead to dangerous Soviet and leftist involvement in this region.

Iraq also fears jeopardizing its new image as an Arab and nonaligned leader and, observers say, it is aware that few Arab leaders could side with Baghdad in a battle against Ayatollah Ruhollah Khomeini and his militant Islamism despite their misgivings about his regime.

Iraq's reasoning in refraining from attacking Iran's deteriorated armed forces is well understood in Tehran, according to knowledgeable observers. Thus Iran enjoys a virtually free hand in acting out a foreign diversion on its border as a distraction from its growing domestic problems.

Barring an unforeseen accident, the border tension is not expected to expand into serious fighting, much less a full-scale war, largely because of Iraqi restraint, in the view of analysts here.

Diplomats here say Iraqi officials understand that Bani-Sadr is seeking to use the border tensions to shore up his authority following his inability to persuade Khomeini to transfer the U.S. Embassy hostages to government control.

Creating border tension, they reason, is the best way for Bani-Sadr to beef up the Iranian armed forces he nominally commands and thus strengthen the central government.

On paper, Iraq's 200,000-man armed forces are well-trained, disciplined and equipped. They far outmatch their Iranian counterparts, whose once-pound reputation as the Middle East's most powerful war machine after Israel is a victim of the Islamic Revolution.

While Iraq may consider recent Iranian calls for a military coup in Iraq to be wishful thinking, the Baghdad authorities cannot be entirely sure how sympathetic their Shiite Moslem soldiers might be to Khomeini.

The Iraqi officer corps is believed largely drawn from the ruling Sunni Moslem minority in Iraq. No breakdown of Shiite strength among the enlisted men has ever been published, but Shiites make up an estimated 55 percent of the Iraqi population of just under 15 million.

Despite public statements to the contrary, the Iraqi leadership is content with the present weakened state of Iran and understands the risks of Soviet penetration and leftist influence if that country were to collapse, according to diplomats.

Iraq's policy apparently is to keep stirring up Iran's minorities -- the Baluchis, Turkomans, Kurds and the Arabs of oil-rich Khuzestan -- to avoid a crusade for national unity led by the Persian heartland.

Moreover, any invasion of Iran -- or even increasing the limited support for harassing actions by Iran's national minorities -- risks compromising Iraq's carefully burnished image as the champion of Arab world and nonaligned unity.

Iraqi President Saddam Hussein has embarked on a policy of prestige -- spending tens of millions of dollars on luxury hotels, a conference center, and even on opera house -- in preparation for the 1982 nonaligned summit conference which he is to host.

Additionally, the Soviet news media has hinted that Moscow would side with Iran in any serious crisis with Iraq. Iraq's fellow Arab regimes -- and the Palestine Liberation Organization so favored here -- have been reluctant to criticize Khomeini's revolution.

Despite the harsh insults exchanged by Radio Tehran and Radio Baghdad, both government actually have been relatively prudent.

Baghdad, observers say, does not really expect Iran to evacuate three strategic Arab islands near the Straits of Hormuz occupied by Iran since 1971 or to return the Shatt al Arab estuary to full Iraqi control, as it was before 1975.

On the other hand, Khomeini, despite his hatred for the Iraqi regime for expelling him in 1978, seems aware that large-scale subversion here could bring about serious retribution.

As one veteran diplomat put it: "Basically, Iraq has already won the war. The shah's Iran was a strong state militarily capable of hurting Iraq badly.

"The real danger," he said, "is as much Iranian anarchy as it is the ayatollah's call to Iraqi Shiites to rise up and oust the Baghdad regime."