DUBAI, UNITED ARAB EMIRATES, JULY 15 -- Hojatoleslam Ali Akbar Hashemi Rafsanjani, the speaker of the Iranian parliament, has threatened that Iran will attack U.S. shipping in the Persian Gulf and any Arab states in the region that provide assistance to U.S. military forces, Iran's official news agency reported today.

Rafsanjani's statements, published by the Islamic Republic News Agency, appeared to reflect an escalation of Iran's propaganda intended to get the United States to back away from its plans to provide naval escorts to 11 reflagged Kuwaiti tankers beginning next week.

The reports of the threats came as Kuwait formally asked Britain to join the reflagging effort. The government of Prime Minister Margaret Thatcher responded that registering Kuwaiti ships as British would be purely a commercial matter and would not guarantee protection for the ships from the three Royal Navy warships in the gulf.

The rejection appeared to be directed as much at the United States as at Kuwait, since the Reagan administration had urged the British to join in protecting Kuwaiti ships.

The latest Iranian warnings to the United States were issued yesterday at a ceremony in Tehran honoring commanders of the Islamic Revolutionary Guards Corps, whose force of high-speed gunboats has mounted hit-and-run attacks on shipping in the gulf in recent days. Last week, a U.S.-operated tanker, the Peconic, was hit by rocket-propelled grenades from such an Iranian gunboat, but suffered only minor damage.

When the U.S. ships enter the gulf, Rafsanjani was quoted as saying, "we would point part of our artillery at the Yankees and take American captives with their hands on their heads to camps with humiliation."

In his statement, Rafsanjani also warned Arab states, which tend to support Iraq in its war against Iran, to stay out of the fray.

"If you put your bases or ports at the disposal of the U.S., we would capture them," Rafsanjani said.

{In another development, a car bomb exploded in a fashionable shopping district of Kuwait Wednesday night, killing two people, The Associated Press said, quoting the Kuwaiti news agency KUNA.}