Iran attacked Iraqi border positions in the rugged mountains northeast of Baghdad yesterday in the first significant ground offensive in the Persian Gulf war in eight months.

Iraq, apparently suspecting that the predawn offensive in the central sector of the war front was a diversionary ploy, used helicopter gunships against the attack and also launched preemptive strikes at Iranian positions about 400 miles to the south, where Iran reportedly has massed 250,000 troops in preparation for a long-threatened major offensive, according to news agency reports.

Both sides claimed huge successes in official communiques, but the indications yesterday evening were that fighting was continuing.

Iraqi military communiques claimed Iraq's helicopter gunships launched "intensive" daylong strikes against "retreating enemy troops" in the central sector fighting around the town of Saif Saad, an area claimed by both Iran and Iraq. Military communiques in Baghdad reported that Iraq had killed 923 Iranian troops in the central sector and another 250 in the fighting in the south.

In Tehran, however, the official Iranian news agency broadcast reports claiming that its fighting force of army units, volunteers and members of Ayatollah Ruhollah Khomeini's Revolutionary Guards had "liberated dozens of square kilometers" in the center of the front and were killing hundreds of Iraqi troops and destroying their tanks as they continued their advance.

The reports could not be verified independently.

Analysts in the Middle East and in Washington were puzzled by the sudden renewal of ground fighting, but most said they believed the Iranian offensive was a limited operation and not the kickoff of Iran's "final offensive" to end the four-year-old war that was widely expected at the southern end of the front during the summer.

"We don't believe that it's D-Day," said a European diplomat in Washington.

Iran tended to describe a limited operation aimed at protecting Iranian border villages from Iraqi artillery fire. Diplomats and observers in the Iranian capital said this justification seemed to indicate that the Iranian attack in the mountainous central front area was unlikely to develop into a major operation.

"The terrain is just not suited for it," an Asian military attache in Tehran told Reuter.

Many diplomats in Iran believe the statements by Iranian leaders calling for a final offensive are mainly for public consumption. They tend to believe that Iran's real position is reflected in the comments of Hojatoleslam Ali Akbar Rafsanjani, the speaker of parliament, who has called for "one or two effective blows" against Iraq and argued against trying to reach Baghdad.

He appears to feel that this tactic will cause conservative Persian Gulf oil states to cut back on the generous amounts of aid they are now providing Iraq.

In the view of most western analysts, that aid and the new, sophisticated weapons shipped to Iraq by France and the Soviet Union during the lull in fighting has helped Iraq increase its military superiority and strengthen its defenses.

The analysts believe that Iran, on the other hand, has had great difficulty getting new weapons and spare parts for many of the crippled American-made armaments in its arsenal. Iran, however, still has the advantage of being a far larger country than Iraq with seemingly limitless numbers of troops to throw into battle.

In the last large-scale ground fighting of the gulf war in February, Iraq claimed to have killed 50,000 Iranian soldiers as they futilely attempted to occupy southern Iraq's Huwaizah Marsh and isolate the port city of Basra.

The border area of Saif Saad, focus of the main battles yesterday, long has been claimed by both Iran and Iraq. In 1975, the two countries signed a treaty that stipulated among other things that the area should be returned to Iraq, but the provision was never implemented. Iraqi President Sadam Hussein abrogated the treaty after accusing Iran of violating its commitments and ordered his troops to "liberate" Saif Saad. They entered the area in at the beginning of the war.

The other area of the front involved in yesterday's fighting was Khorramshahr, the big Iranian port city across the Shatt al Arab waterway from Basra. It was when Iraqi troops crossed into that area on Sept. 22, 1980, that the gulf war began.

After the long, costly, intermittent battles since then, Iraq has pressed for peace, but Iran has spurned those offers.

Since February, the Iraqis declared a sea and air blockade of Iran's Kharg Island oil terminal in an effort to deprive Iran of the oil earnings it needs to continue the war. Iraq has attacked commercial vessels sailing to the island and nearby Iranian ports. Iran has retaliated frequently.

According to the estimates of Lloyd's, the London insurance firm, 52 oil tankers and bulk carriers have been attacked by either Iran or Iraq this year.