Iraqi warplanes struck deeply into Iran yesterday in two waves of attacks that transformed a week of border skirmishing between the two Middle Eastern nations into an undeclared war that could threaten the flow of oil from the upper Persian Gulfd to the West.

Following a midday raid by Iraqi Mig fighter-bombers on the Tehran international airport and eight other Iranian airfields, the government in Tehran issued a military communique stating that "all waterways near the Iranian shores are declared war zones. Iran will not allow any merchant ships to carry cargo to Iraqi ports."

Interpreting this statement as an Iranian threat to seize control of the Hormuz Strait, through which 60 percent of the West's oil imports pass, the ruling Iraqi Revolutionary Command Council early today issued a statement saying Iraq would take all necessary measures to prevent Iran from attempting to impose its authority over the vital waterway.

"This amounts to a declaration of total war and prepares the atmosphere for the intervention of foreign forces in the affairs of the region," the statement said.

An Iranian military communique reported new air attacks in the Persian Gulf by Iraqi planes early today. The communique said a number of Iraqi planes attacked Iranian Navy boats, which countered with antiaircraft fire.

Tehran Radio reported that Iranian tanks "crushed the enemy positions around Khorranshahr" on the gulf.

Iraqi state radio said today that the Baghdad government ordered its forces to invade "vital positions inside Iran."

At least four neutral ships were reportedly hit yesterday while passing through the Shatt-al-Arab waterway, the main point of territorial dispute between the two countries since the fighting flared into a major confrontation last week. On Wednesday, Iraqi President Saddam Hussein said his country was canceling the Algiers agreement of 1975 with Iran and was determined to reestablish Iraqi sovereignty over all the Shatt-al-Arab throught the "force of arms."

Following the Iraqi air raids yesterday, Iran retaliated by raiding two Iraqi air bases. Later, Iranian Prime Minister Mohammed Ali Rajai said over Tehran Radio that Iran had downed 10 Iraqi Migs, one Tupolev bomber and four missile-launching boats.

Last night, the Iraqis mounted a second round of attacks on Iranian air bases and other military positions, and the Baghdad general command claimed six Iranian planes were shot down over Iraqi territory during the night, with three of the pilots captured.

The dispute between the two traditional gulf rivals has been brewing ever since the fall of the late shah, Mohammad Reza Pahlavi, in February 1979 and began taking a turn for the worst last spring with a spate of cross-border attacks and artillery duels that have slowly developed into the present crisis.

Ayatollah Ruhollah Khomeini has repeatedly threatened to "export" his Shiite Islamic revolution into neighboring Iraq, where the government is led by Sunni Moslems. In a broadcast last night, the ayatollah charged Saddam Hussein with carrying on war "against Islam in support of blasphemy." He accused the Iraqi leader of being an "infidel" and of supporting President Carter by attacking Iran.

It was impossible to verify the two sides' claims and counterclaims, and reports about the fighting came almost entirely from Baghdad and Tehran state radios relayed by Western news agencies, with no independent verification possible.

At the end of the day of fighting, Tehran had cut off all its outside commercial communication links, closed its airspace and was busy mobilizing Iranians for the war. The Iraqi News Agency accused Iran of bringing the situation to a state of "total war."

While neither Iran or Iraq has yet formally declared war, Western capitals, international financial markets and insurance companies all reacted sharply to the escalation of fighting. The chief concern was the possibility that the shipment of oil from Iran, Iraq and nearby Kuwait -- roughly 5 million barrels a day altogether -- might be interrupted as a result of the hostilities.

The price of gold shot up $34 on the London market, closing at $711.50 and soared to around $722 in New York before settling back to $715. Insurers quadrupled their rates on war risk insurance for oil and other freight transportation to and from Iran and Iraq, because of the hostilities.

Administration energy officials closely monitoring statements coming from the two governments said a formal declaration of war from either would probably have the effect of bringing to a virtual halt all oil shipments since companies would no longer provide insurance on tankers going anywhere near the war zone, including Kuwait.

In Moscow, a top adviser to Saddam Hussein briefed senior Kremlin officials on the Iraq-Iran conflict. Tareq Aziz opened two days of speedily arranged talks with a meeting with Communist Party secretary Boris Ponomorev and Victor Maltsev, deputy foreign minister.

There was speculation that the Iraqi government had sent Aziz to Moscow to assure spare parts and other military supplies for its Army, which is largely equipped with Soviet weapons, in case the war with Iran drags on for several weeks.

In Paris, the prevailing official view was that Iraq would probably not try to conquer any significant amount of Iranian territory because this would only seek to rally patriotic sentiment around the revolutionary regime of Khomeini, thereby strengthening, rather than weakening it.

The French view is that, at most, the Iraqis will seek to stir up a latent autonomy movement in Khuzestan, the Arab-populated oil region of Iran that the Iraqis refer to as "Arabistan," Washington Post correspondent Ronald Koven reported.

U.S. military specialists studying the fragmentary information available tended to agree with the French view that the fighting would probably stop short of an all-out war between Iran and Iraq. Neither country, they noted, was moving to establish the kind of supply lines needed to sustain a fullscale war.

The Iraqi Army was moving tanks, armored cars and artillery out of Baghdad yesterday toward the disputed border area, however, according to intelligence reports reaching Washington. This was interpreted initially as a show of force rather than any intention to broaden the conflict by actually committing large numbers of tanks and armored cars.

Perhaps most concerned by the sudden turn of events in the gulf area was Israel. Washington Post correspondent William Claiborne reported that Israeli officials were assuming that Iraq would come out on top in the fighting and that this would serve to strengthen militarism and militancy across the Arab world to Israel's detriment.

Chief among Israeli fears was that the United States would try to push Saudi Arabia into applying pressure on Iraq for a cease-fire, and that the Saudis would demand a price for this from the Americans. The most likely price, in the Israeli view, would be increased U.S. pressure on Israel to make concessions in the stalled Palestinian autonomy talks with Egypt.

One reaction common to all government watching the dispute, from Moscow to Washington, was that the lack of precise information about the war made judgments about either side's ultimate intentions a risky business.

Iraq yesterday called its raids on nine Iranian airfields, including the Tehran international airport, "deterrent strikes" ordered to "foil the racist Iranian regime's attempt to undermine Iraqi sovereignty."

Other reports suggested the Iraqi raids were in retaliation for the reported Iranian shelling of four cargo ships, two flying Japanese flags, one a Liberian flag and the fourth a Greek one. An Iraqi military spokesman said that the bridge of the Japanese freighter Camelia was damaged but the ship did not halt. The other three were able to continue their voyages after Iraqi forces halted the Iranian guns, he said. All four were also flying Iraqi flags as they had been ordered to do by the Iraqi government.

Late yesterday, a British Trade Department official said a British merchant ship had also come under fire while sailing up the Iranian side of the vital 120-mile-long Shatt-al-Arab. He added that there were believed to be a number of other British vessels trapped in the Iraqi port of Bahra.

An Iranian Revolutionary Guard commander reported the Iraqi Migs had bombed the airports in Ahwaz, Hamadan, Tabriz, Dezful, Tolumbeh Sabz, Boushehr and Tehran. Later, the Iraqi News Agency added the Shiraz airfield and Isfahan, two sites where American F14s, the most modern in the Iranian Air Force, are located.

The damage done by these bombings remained unclear. It was also unknown what damage the retaliatory Iranian attack on the two Iraqi fields had inflicted.

A spokesman at the Tehran international airport control tower was quoted as saying an Iranian Air Force Boeing 707 was damaged in the Iraqi bombing as well as housing under construction nearby. Later, Iranian authorities reported a second aircraft destroyed at the airport.

The state radio reported today that one of Iran's own aircraft dropped a bomb while taking off from the capital's Mehrabad Air Base.

"An explosion occured at the southern Mehrabad base a few minutes ago after a bomb was dropped from an Iranian Air Force plane as it was taking off, the broadcast this morning said. "There is no report of casualties or damage yet," the broadcast said.

There were indications that Iran, in addition to attempting to assert its control over the Hormuz Strait, might also be ready to take action against any other gulf Arab state coming to Iraq's aid.

The Iranian General Staff issued a stiff warning that any gulf state allowing its ports or airfields to be used for attacks against Iranian territory would be liable to Iran counterattacks.

Israeli television reported last night that several Iraqi planes had landed at an airfield northeast of Amman, Jordan, including several Soviet-made transport aircraft and a U.S.-made Boeing. The television report said Israel had been informed that the purpose of the planes' movement was to protect part of the Iraqi air fleet against possible Iranian attack.

By the end of yesterday's fighting, conflicting reports from the two capitals said the 244 Iraqis were killed, 36 Iranians had been injured or captured, and one Japanese seaman hurt aboard one of the vessels fired upon since the flare-up in the fighting last week.

In addition, Iran claimed it had shot down or destroyed 20 Migs, 21 tanks, 6 helicopters, four missile boats and a warship belonging to Iraq, while admitting to the loss of four aircraft, 11 tanks, three gunboats and one helicopter.

Iraq claimed to have bombed a total of 11 Iranian air fields and two radar stations in Western Iran in addition to shooting down six Iranian aircraft, all in the course of yesterday's fighting. There was no independent verification of any of these claims.

Nonetheless, on the basis of these and other reports it appears that little ground fighting has taken place so far along the two countries' 720-mile-long common border and that most of the combat has involved air, naval and artillery clashes.

The one area where Iraqi ground forces have apparently gone into action was in the Shatt-al-Arab, where Iraq claimed to have seized control early last week of a roughly 30-square-mile piece of land formerly belonging to Iran.

The Iraqi government said this was land that was originally part of Iraq and was supposed to be returned to it under the Algiers agreement it abrogated last week.

"Iraq has liberated all the territory that was demanded," an Iraqi Defense Ministry spokesman was quoted as saying last week.