CAIRO, SEPT. 22 -- The speaker of Iran's parliament, Ali Akbar Hashemi Rafsanjani today pledged that the United States "will soon regret" its attack on an Iranian vessel accused by the United States of laying mines in the central Persian Gulf and demanded the immediate return of the 26 Iranian crewmen in U.S. Navy custody, according to broadcasts from Tehran.

News of the attack by U.S. helicopters on the vessel last night came as Iran had launched a "war week" of military displays in its cities to mark the seventh anniversary of Iraq's land invasion of Iran. Rafsanjani lashed out at the United States in speeches broadcast by Tehran radio while Revolutionary Guards marched through the capital displaying their military hardware while Iranian Air Force jets flew overhead.

The speaker, according to the official Islamic Republic News Agency (IRNA), said the U.S. attack was timed to divert attention from the speech at the United Nations in New York of Iranian President Ali Khamenei.

Rafsanjani labeled American claims that the Iranian ship, Iran Ajr, was caught laying mines by two U.S. Navy helicopters monitoring its movements with night vision equipment "a pure lie." He asserted that five Iranian seamen had died in an unprovoked attack. In Washington, the Pentagon said three Iranians died, two were missing and four others were wounded.

According to the version of events broadcast by Tehran radio, "the ship belongs to the shipping company of the Islamic Republic of Iran and had been placed at the disposal of the country's Navy."

An Iranian Foreign Ministry statement read on the radio demanded that "U.S. forces immediately hand over the ship's crew," who it said were carrying "cargo and supplies for armed forces stationed in Bushehr," an Iranian port in the central Persian Gulf.

The U.S. Navy later took a group of American journalists aboard the captured Iran Ajr to view the 10 mines and other seized mine-laying equipment. Lloyd's Register for Shipping for 1982-83 lists the 1,662-ton vessel as a "roll-on, roll-off" cargo ship, meaning that its hull is designed to open onto a pier enabling the quick loading and unloading of cargo containers.

Such a vessel could be easily adapted for mine laying, shipping sources said. The owner of the ship was listed by Lloyd's as the Iran National Shipping Lines, but the listing was dropped in later editions of the registry, indicating that the ship had left civilian or commercial service.

Meanwhile, U.S. diplomatic missions in the region were believed to be taking extra precautions against possible terrorist attacks following the latest escalation of U.S. involvement in the gulf war.

There was little public or private reaction to the U.S. attack in Arab capitals, where most officials were awaiting the Iranian reaction and evaluating the U.N. speech of Iranian President Ali Khamenei.

Aside from Washington and London, there was relatively little immediate public or official reaction to the attack in world capitals.

In Moscow, a Soviet Foreign Ministry spokesman called the outbreak of violence in the Persian Gulf a natural consequence of the military buildup in the region, but refrained from any direct comment on the U.S. attack.

"If a large number of American ships are concentrated in the Persian Gulf, inevitably the day will come when they start firing," the spokesman, Boris Pyadyshev, said. "Alongside the war between Iran and Iraq, the presence of military ships is a major cause of tensions in the region."

U.S. officials in the region were divided on whether the episode would thrust the United States deeper into a combat role in the gulf, where U.S. policy has been thus far limited to escorting 11 Kuwaiti oil tankers reregistered under the American flag from Kuwait's oil and gas loading ports through the Strait of Hormuz at the mouth of the gulf.

"It may very well turn out to be a self-contained incident," said one U.S. diplomat by telephone from one gulf country.

The State Department has issued guidance to U.S. missions in the area, explaining the U.S. position that the Iranian vessel effectively was caught laying mines in international waters in the path of U.S.-escorted convoys.

"If our goal is to contain the conflict, then you can make a good case for what we did," one U.S. official in the region said.

But the official also expressed concern that the United States had crossed a new threshold in the gulf, showing a willingness to strike offensively at the Iranian perpetrators of mine warfare and other seaborne assaults whose actions have been broadly directed at international shipping targets rather than at vessels that come under direct U.S. escort protection. The Iranians said their actions have been in response to stepped-up Iraqi raids on Iranian oil and shipping targets. The consequences of the American military action, the official acknowledged, might well lead to escalating military clashes between U.S. naval forces and Iran.

Still, this official defended the action, arguing the Navy helicopters were justified in striking a vessel caught laying mines in areas where U.S. warships and their merchant convoys pass.

This official also said that the United States earlier had sent private warnings to Iran about mining activity.

"The Iranians were informed in advance of the kind of reaction we would make in a situation like that," he said.