Iran will be in position within four to six weeks to mount an invasion of Iraq that could have far-reaching consequences in the strategic Persian Gulf, according to U.S. officials.

This sense of an imminent and important decision in Tehran, as well as the continuing intense concern of conservative Arab states, prompted Secretary of State Alexander M. Haig Jr.'s decision to speak out in highly visible fashion about the Persian Gulf war Wednesday night, State Department sources said.

After months of saying little or nothing about that conflict, seen by many observers as being potentially far more dangerous than the British-Argentine clash in the South Atlantic, Haig gave it first priority in his address on the Middle East at the Chicago Council on Foreign Relations.

While restating U.S. neutrality, Haig said that U.S. "friends and interests" are endangered by the continuation of hostilities. He announced that "in the weeks ahead" the United States and others will take "a more active role" to bring an end to the war.

The Iranian recapture this week of the port city of Khuninshahr (formerly Khorramshahr) symbolized nearly complete victory by Iran in the 20-month war. In the U.S. view, Iranian forces will require at least a month to recover and regroup from the recent battles, believed to have involved heavy loss of life.

Although there are continuing signs of Iranian willingness to move into Iraq, the dominant view among U.S. officials is that this decision still remains open. For this reason, the weeks immediately ahead are seen as particularly critical, affording an opportunity for international diplomacy to play a role in Tehran's decision.

The United States has little influence in either Iran or Iraq. A "made in America" solution to the war would be instantly rejected by both sides, according to U.S. officials.

The U.S. and western stakes in the future of the oil-rich region, however, are obvious and enormous, and Tehran's choices in the coming weeks are considered likely to have a large and perhaps long-lasting effect.

This circumstance has returned Iran, for the first time in a long while, to a central position in the Persian Gulf equation as seen from Washington, and thus back to a high-priority place on the policy-making agenda.

The United States would prefer that Iran stay on its side of the Iraqi border and of the Shatt-al-Arab waterway at the mouth of the Persian Gulf. Such a decision by Iran would lay the basis for a negotiated settlement with Iraq, probably including reparations for the Iraqi invasion.

Such a settlement would be far from easy. But it would permit Iran to turn to reconstruction and avoid the rapid growth of new instability in the area.

If Iran decides to advance, the immediate objective is likely to be the Iraqi city of Basra, just across the waterway. Officials here do not minimize the Iranian temptation to take over the city, partly in an effort to bring down the regime of President Saddam Hussein. Another serious possibility, as seen from Washington, is Iranian action through subversion, paramilitary or military means to take over the Islamic holy sites of Karbala and Najaf, south of Baghdad. These sites are particularly holy to the Shia branch of Islam, that of Ayatollah Ruhollah Khomeini and most Iranians.

Any continuation of the war, in Washington's view, would increase the already worrisome Iranian military dependency on the Soviet Union, directly or indirectly, for military supplies.

And any spread of the war, or of Khomeini's Islamic militance, beyond Iraq to other areas of the Persian Gulf would be extremely dangerous. Any attack, possibly even credible threat of attack beyond Iraq in the Persian Gulf, is likely to require a strong U.S. response in order to maintain American credibility. Yet the use of American force in this region would be fraught with dangers and could itself be destabilizing.

For all of these reasons that concentrate the mind, U.S. attention is swinging anew to the Persian Gulf. Nobody is certain that diplomatic activity by Washington can be effective, but there is general agreement and now a formal statement by Haig that a serious effort must be made in the weeks ahead.