The current fighting between Iran and Iraq marks the explosion of centuries of mutual suspicion and hostility into a modern war with as yet incalculable consequences, both for the two countries involved and for the West's Persian Gulf oil Lifeline.

During the past year and a half, the conflict has escalated from exchanges of invective to sabotage in both countries to border skirmishing and finally to air strikes and an apparent Iraqi invasion of southwestern Iran this week. t

The two countries had traded shots across their border for several years in the early 1970s as the government of the late shah of Iran supported an insurgency by separatist Kurds in northeastern Iraq. A period of peace and gradually improving relations followed an agreement signed in Algiers in 1975 in which Iran agreed to stop helping the Kurdish rebels and rival territorial claims were resolved.

Until Iran's February 1979 revolution, American intelligence analysts considered the two neighbors' armed forces more or less evenly matched. Iraq was seen as generally "more combat capable," having crushed the Kurdish insurgency and sent some troops into battle against Israel in the 1973 Middle East war. By contrast, Iran's only recent combat experience had been in Oman's southwestern Dhofar region, where the shah helped Sultan Qaboos' forces put down a relatively small-scale rebellion by Marxist guerrillas.

Iran's better equipped and trained Air Force and Navy had an edge over Iraq's but not a decisive one, according to U.S. military specialists.

"Neither side could have decisively attacked and defeated the other," a military intelligence analyst said.

Now, however, two years of Iranian revolutionary turmoil have taken their toll, and the new government's policies have boomeranged against it with a vengeance.

Purges down to the junior officer level have demoralized Iran's armed forces. Organization, command and control and logistics have largely broken down, U.S. experts believe, and the seizure of the American hostages has deprived Iran's military of much-needed U.S. and European spare parts for its almost entirely imported military equipment.

While hard intelligence is lacking, U.S. military analysts estimate that Iran is capable of flying only a handful of its 77 U.S.-supplied F14 jet fighters, the most advanced aircraft in the country's arsenal. Even so, the experts figure, those planes are probably useless, since the American-run training program did not completely cover the F14's weapons system before the revolution.

Of Iran's other 370 listed combat aircraft, probably no more than a quarter can still be flown on missions because of maintenance, spare parts, manpower and other support problems. The problems are believed to be greater in Iran's fleet of F4 fighter-bombers than in the relatively less sophisticated -- and less vital -- F5 interceptors that make up the backbone of the Iranian Air Force.

"This is nowhere near the Air Force of January 1979," a Pentagon analyst said. "The revolution came about two years too soon for the Iranian military."

Despite the Iranian military's problems, however, its Navy is still believed to hold an edge over Iraq's. Before the revolution, Iran's Navy was larger than those of all the other Persian Gulf littoral states combined, and the shah had embarked on an expansion program to make it a regional superpower. Although the Iranian Navy's current capabilities are unknown, its inventory includes one referbished Tang-class submarine, three destroyers, four frigates and about a dozen French-supplied "Combattante" missile-firing fast patrol boats.

"If the Iranians wanted to take action at the Strait of Hormuz" at the entrance to the Persian Gulf, "it would be difficult for the Iraqis to stop them," an American analyst said.

Overall, however, the Iraqi forces are considered far superior to the Iranian military, which is estimated to be at about half its prerevolutionary total strength of 415,000 regulars.

Two traditional sources of dispute between the countries have been that Iraq is an Arab state controlled by the Sunni Moslem sect white Iran is Persian and dominated by the rival Shiite sect. Since the Iranian revolution a third major one has been added: Iraq has a firmly secular government whereas Iran is run by devout Moslem fundamentalists.

The roots of the current conflict can be traced back 4 1/2 centuries when the Ottoman and Persian empires first squared off over the Shatt-al-Arab waterway. Several treaties demarcating the channel were signed and broken until the 1975 Algiers agreement between the shah and Baghdad restored the "Thalweg principle," first applied to the waterway in 1937. This put the border back in the middle of the Shatt-al-Arab's central navigable channel and ended six years of border clashes.

Iranian-Iraqi relations again started to go sour almost immediately after the Iranian revolution last year. Responding to a request by the shah, Iraqi authorities had tried to silence Ayatollah Ruhollah Khomeini, who in 1978 was stepping up calls for the Iranian monarchy's overthrow from his exile in the Shiite Moslem holy city of Najaf south of Bagdad. In the fall of 1978, the Iraqis finally expelled Khomeini, who then went to Paris.

Khomeini never forgot this indignity, and after he returned to Iran in triumph in February 1979 he set about encouraging Iraqi Shiites -- who make up about half that country's 13 million population -- to rise against their Sunni Moslem leaders.

A Shiite clergyman was appointed ambassador to Iraq, and pro-Khomeini religious leaders there became increasingly active. Iraq responded by encouraging ethnic Iranian Arabs in the oil-rich Iranian province of Khuzestan, which borders Iraq, to press for automony. During several months of agitation and violence in the province in the spring and summer of 1979, Iran accused Iraq repeatedly of complicity in sabotaging Iranian oil installations.

Another source of friction was a longstanding claim -- revived by Iran's new clerical leaders last year -- that the Arab-ruled Persian Gulf sheikdom of Bahrain belonged to Iran. Iraq, meanwhile, demanded that Iran give up three small islands in the Strait of Hormuz that the shah's Arab emirates of Sharjah and Ras Khaimah.

Relations between the two countries worsened even more earlier this year when Iraq cracked down brutally dissident Shiites. An Iraqi ayatolla Mohammed Bagher Sadr, was secretly executed in an Iraqi prison in April and Baghdad was rocked by a wave bombings and assassination attempts. At least twice, assassins tried to kill Iraqi Vice Premier Tareq Aziz.

As relations continued to sour, each side began calling openly for the other's overthrow and stepped up aid to each's domestic opponents. Iranian opposition leaders, including former prime minister Shahpour Bakhtiar and Gen. Gholam Ali Oveissi, reportedly visited Iraq to seek its help.

Border skirmishing flared in June and earlier this month. Then on Sept. 10, Iraq announced that its forces had captured a 75-mile strip of territory about halfway up their border that Baghdad claimed rightfully belonged to Iraq under the Algiers agreement, but which Iran had never relinquished. Fiercer border fighting followed.

That still fairly localized conflict exploded into larger-scale warfare after Iraqi President Saddam Hussein finally abrogated the 1975 accord on Sept. 17 and claimed Iraqi sovereignty over all of the Shatt-al-Arab.