DUBAI, UNITED ARAB EMIRATES, AUG. 31 -- Iranian seaborne commandos attacked a Kuwaiti freighter today with machine-gun fire and rocket-propelled grenades, marking the first reprisal by Iran since Iraqi jets resumed air raids against vessels carrying Iranian oil through the Persian Gulf.

Iranian Revolutionary Guards in three small gunboats opened fire on the 24,349-ton Kuwaiti merchant ship Jebel Ali near the Strait of Hormuz, puncturing the hull and damaging 35 containers, according to shipping sources. The crew was unhurt, and the ship later docked here for repairs.

Hours later, Iraqi jets struck an Iranian supertanker at the southern end of the gulf. It was the third ship to have been hit since the raids resumed on Saturday, breaking a 45-day truce in the so-called "tanker war."

{That attack was followed early Tuesday by another, when Iraqi jets flew low over an Iranian tanker in the central gulf, and scored a hit with one missile, shipping sources quoted by Reuter said.}

Iraq has claimed two other attacks on ships that have not been confirmed by independent sources.

The latest escalation at sea raised fears that U.S. Navy warships, now escorting Kuwaiti reflagged tankers in and out of the gulf, would become primary targets of Iranian forces seeking to retaliate against Iraqi air strikes. Iraq has spurned U.S. appeals to refrain from further air raids on Iranian vessels.

The maritime flare-up also coincided with new tensions on the ground in the nearly seven-year-old war, as both Iran and Iraq warned that they were prepared to revive the "war of the cities," in which Iraqi bombers and Iranian missiles have periodically been launched at civilian populations.

An Iraqi military spokesman claimed that Iraq had "tens of tons of explosives, apart from missiles" with which to respond to any Iranian renewal of attacks on cities, according to Iraq's official news agency. The statement responded to an Iranian official's threat yesterday to strike Baghdad with missiles if Iraq bombed Iran's cities.

Tehran radio reported yesterday that Iran shelled Basra, Iraq's second largest city, hitting industrial targets, according to The Associated Press. Iraq said that two civilians were killed in the shelling. The Iraqis answered the attack by shelling two Iranian border cities, Abadan and Khoramshahr, Tehran radio said.

A U.S.-escorted convoy headed for Kuwait anchored off Bahrain today, short of an area of the gulf considered to be mine hazardous.

Mine-sweeping Sea Stallion helicopters from the USS Guadalcanal were believed to have been sent ahead of the convoy to look for a "black, round object" that the crew of a Bulgarian ship spotted floating in the water about a mile from one of the anchored tankers. The helicopters dropped flares, but apparently could not find any mines, a reporter for the British Broadcasting Corp. said.

The attack on the Jebel Ali by Iranian gunboats took place about 350 miles south of the U.S. convoy. Ten Kuwaiti tankers now fly the U.S. flag, entitling them to U.S. Navy protection.

But the Kuwaiti ship attacked today was not one of the ships in the reflagging program. It flies the Kuwaiti flag and is owned by the United Arab Shipping Co. Six Arab nations, including Kuwait, Saudi Arabia and Iraq, are shareholders in the company.

Despite the threat to U.S. forces protecting the ships of Kuwait, an ally of Iraq, the choice of the Jebel Ali as the first target of Iranian retaliation seemed to suggest a more measured response.

The attack came in an area where, about 20 hours earlier, U.S. warships escorting tankers to Kuwait had offered an accessible target for the commandos or for the Chinese-made Silkworm antiship missiles deployed along Iran's coastline.

The Jebel Ali could be seen from a distance at Dubai's docks today, but journalists were not permitted to view the damage. Shipping agencies that had monitored the Jebel Ali's radio communications and heard reports from its crew said at least two Iranian motor boats had rushed the ship shortly before dawn today, circling it as they fired.

The grenades punctured the hull near the waterline, but the ship was not in danger of sinking, shipping sources said.

The London-based Lloyd's Shipping Intelligence Service reported that Iraqi jets fired a missile into the 226,319-ton Iranian oil tanker Shoush, setting the engine room ablaze. A Lloyd's official reached in London said the tanker was hit near Larak Island, Iran's southern transfer point for oil exports.

The raid near Larak Island served as a blunt Iraqi reminder to Tehran that it can reach every part of the makeshift shuttle system that Iran uses to move crude oil down the coast to outside customers and refined fuels back to Iranian cities. Over the weekend, Iraq struck at Kharg, Sirri and Lavan islands, the other points where Iranian tankers transfer their cargoes.

The Iraqi Defense Ministry's newspaper Al Qadiseyeh warned that "more intensive raids in the coming days" would be mounted against Iran's offshore oil facilities.

The attack on the Jebel Ali, contrasted with the unmolested passage so far of the U.S. convoy, appeared to back suggestions by diplomats here that Iran may hesitate to strike at American forces, even though an Iranian statement yesterday declared that no ally of Iraq, "regardless of the flag they have hoisted," was immune to its reprisals.

"It is no reason for the Americans to relax their guard, but it does suggest they should not give in to any temptation just to see the Iranians as fanatics," an Asian diplomat said. "The Iranians are logical and careful in their way."