DUBAI, UNITED ARAB EMIRATES, NOV. 11 -- Two Iranian gunboats, operating in broad daylight in the vicinity of the largest U.S. Navy convoy to enter the Persian Gulf, today attacked a nearby Japanese-owned tanker making its way toward the Strait of Hormuz.

The attack, carried out in a major shipping channel patrolled constantly by U.S. and Western European warships, demonstrated again Iran's willingness to defy U.S. claims to be defending navigation in the gulf while avoiding a head-on confrontation with the U.S. Navy. A French warship escorting two French tankers also was in the vicinity.

Iran's military tactics in the gulf -- involving both seaborne and missile attacks -- are widely viewed as being extremely clever in picking out targets that are not precisely covered by the American rules of engagement.

The Iranian attack took place within 15 miles of the 12-vessel U.S. convoy, well within its radar surveillance range, shipping sources said. None of the American-escorted convoy -- which for the first time included a Bahrain-flagged ship -- was involved in the attack.

Shortly before the incident, Pentagon officials said, the battleship USS Missouri, which had been stationed protectively just outside the Strait of Hormuz, entered the gulf briefly, accompanied by the cruiser USS Bunker Hill, to escort the convoy through "the Silkworm envelope," a portion of the narrow strait where Iran has deployed Silkworm antiship missiles. The U.S. warships detected no activity at the missile sites, the Pentagon said.

U.S. Navy officials in Bahrain said the attack came 2 1/2 hours after the American convoy entered the strait.

Radio reports from the 12,964-ton Japanese-owned refined products carrier Liquid Bulk Explorer said it was hit four times by rocket-propelled grenades, causing a small fire that was quickly put out. A radio operator said there had been no injuries.

The attack was similiar to an Iranian gunboat assault on a U.S.-owned, Panamanian-registered tanker, Grand Wisdom, last Friday. It was shelled as the U.S. guided-missile frigate USS Rentz steamed a few miles away on a regular patrol.

"The Iranians know that so long as they do not attack a U.S.-flag vessel or a ship under U.S. Navy convoy protection, the U.S. is powerless to respond," said a senior shipping official here. "The Iranians know the U.S. Navy is not going to intervene against them" in such cases.

The United States has sent about 40 warships to the gulf area, citing a need to defend the right of free navigation in this vital waterway, through which much of the world's oil supplies flow. But Washington has limited the U.S. Navy to defending and aiding U.S.-registered vessels or ships put under U.S. Navy protection because they are chartered by the U.S. Sealift Command or for other reasons.

"The Iranians know the rules of engagement, and they have carefully tried not to step over them," said a senior western diplomat in the region. "They know if they do, they will be blown out of the water."

"The Iranians continue to balance their general contempt for the United States with a lively dose of fear," the diplomat added. "They do not want a direct confrontation with the American military, but they want to defy the United States all the same without producing a disproportionate response from us."

He characterized Iran's attitude toward the United States throughout the gulf war as "restrained."

The United States has built up its naval presence in and around the gulf since July when it agreed to reflag 11 Kuwaiti ships and give them protection going to and from their home port at the northwestern corner of the gulf.

Rear Adm. Harold J. Bernsen, commander of the the U.S. Middle East Force, asked Washington last month to allow U.S. warships to go to the rescue of other vessels attacked in the vicinity of U.S. ships -- as the Japanese vessel was today -- but Washington refused.

Today's attack was seen by shipping and diplomatic sources in the region as a particularly brazen gesture since it came so close to the 17th U.S. convoy -- six commercial vessels, including three reflagged Kuwaiti tankers, two U.S. flag ships and a Bahraini freighter carrying U.S. military supplies -- escorted by four U.S. guided-missile frigates moving behind two mine-sweeping tugs.

It was the first time that a Bahraini-flagged ship joined a U.S. escort and was a departure from the general U.S. policy of providing protection only to U.S.-flagged vessels, a Navy official told pool reporters aboard the Rentz, one of the escorting vessels. He said the Bahraini request for U.S. protection of the vessel was made within the past "few weeks" and was a "formal arrangement" between the United States and the gulf sheikdom, which has maintained neutrality in the Iran-Iraq war.

In Washington, a Pentagon official said that only twice previously have U.S. warships escorted foreign-flagged vessels carrying American "foreign military sales items" in the Persian Gulf.

How crowded the sea lanes are in the gulf was underscored today by the fact that at the time the Iranian gunboats were attacking the Japanese vessel off the United Arab Emirates sheikdom of Umm Qawain, the French warship Dupliex was escorting two tankers on a nearby course parallel to that of the U.S. convoy, and an Italian minesweeper was a short distance up the gulf, leading an Italian tanker leaving Saudi Arabia.

Iran's tactics in the gulf apparently have been either to cause incidents that are hard to trace directly to it, such as the mining of gulf shipping lanes in August and September, or to launch nighttime attacks by speedboats that cannot be easily identified.

Shipping officials here said that although mines laid by Iranians have damaged U.S.-escorted vessels, only in the case of last month's Silkworm missile attack on the reflagged Kuwaiti tanker Sea Isle City has Iran directly attacked a U.S.-flag vessel. And that, shipping officials say, was likely a mistake.

The Sea Isle City attack Oct. 16 came a day after a Silkworm missile hit the U.S.-owned, but Liberian-flagged, tanker Sungari as it came to dock at a Kuwaiti offshore oil-loading station.

The Sea Isle City, which was in Kuwaiti waters after being escorted up the gulf by the U.S. Navy, decided to detour so its officers could photograph the damage to the Sungari.

The Sea Isle City was hit when it came next to the Sungari, leading defense analysts to believe that the second missile may have been aimed at the Sungari but drawn to the Sea Isle City, which had a higher radar profile.

Washington had indicated it would not retaliate for the attack on the Sungari because it had been carried out in Kuwaiti waters and the ship flew the Liberian flag.

But the attack on the Sea Isle City, which blinded its U.S. captain and wounded 16 others, was seen as another matter. It was a U.S.-flagged ship. Three days later, four U.S. warships destroyed an Iranian offshore oil drilling platform that U.S. officials said was used for radar monitoring of ship traffic.

Iran responded with another Silkworm missile in the Kuwaiti oil-loading terminal itself, presumably knowing that the United States would not retaliate for that. Since then, Iran has limited itself to strikes against non-U.S.-flag ships.