Iran said today that its forces have captured what was once Iraq's major Persian Gulf oil port in the second day of an offensive in which both sides claimed to have inflicted heavy casualties.

Iraq denied as "delirious and groundless" the Iranian claim to have captured the port of Faw, which is 40 miles south of the Iranian city of Khorramshahr. An Iraqi spokesman said Faw and Umm Rassas, an island in the Shatt al Arab waterway that Iran also claimed to have captured, are "completely under Iraqi forces' control."

But the reports of Iran's advances clearly worried other Arab states on the gulf, particularly Kuwait, whose capital is only 50 miles from Faw and which was described by Tehran radio today as a "new neighbor" of Iran.

"Kuwait condemns and is deeply concerned by Iran's attempts to occupy Iraqi territory," a Kuwaiti statement said. "Its offensive threatens security and greatly harms countries in the region."

Kuwait is one of the prime financial backers of Iraq in its 5 1/2-year-old war with Iran, which unlike the other gulf countries, is not Arab. Kuwait and the other Persian Gulf states have been concerned for several years that Iran's Islamic revolution could inflame the region.

Faw, on the gulf, was Iraq's primary terminal for exporting oil before the war. It came under attack at the beginning of the war in September 1980 and was virtually abandoned by the Iraqis, reducing the strategic value of its capture to the Iranians.

"The green flag of Islam is now flying over the highest minaret in Faw," Iranian President Ali Khamenei said at a rally in Tehran marking the seventh anniversary of the overthrow of the shah and the rise to power of Ayatollah Ruhollah Khomeini.

Khamenei also warned Kuwait against allowing Iraqi forces to use the Kuwaiti island of Bubiyan, 10 miles southwest of Faw.

Military analysts say Iran's latest drive, which has swung south of the city of Basra, may be a feint designed to draw Iraqi defenders from the northern and eastern approaches to Basra. It has long been an Iranian objective to threaten Basra, Iraq's second-largest city, in an effort to destabilize the government of President Saddam Hussein.

Diplomats in Baghdad were reported as saying heavy fighting was raging along the western banks of the Shatt al Arab, a 120-mile-long waterway at the head of the gulf.