U.S. military helicopters firing machine guns and rockets sank three Iranian gunboats in the Persian Gulf yesterday, after the Iranians shot at a U.S. patrol helicopter flying over international waters, Pentagon officials said yesterday.

Three or four Iranian gunboats fired at an observation helicopter patrolling about 15 miles southwest of Iran's Farsi Island about 9:50 p.m. (2:50 p.m. EDT), officials said. Several U.S. helicopter gunships responded to a radio call for help from the observation helicopter and opened fire on the Iranian boats, Pentagon officials said.

U.S. forces sank three of the gunboats and a fourth vessel was believed to have escaped. None of the U.S. helicopters was hit and no Americans were injured, Pentagon officials said.

A Navy patrol boat rescued six survivors from the water, three of whom were seriously injured, officials said. Two of the injured later died, and Pentagon officials said they do not know how many other Iranians may have been killed.

"The firing on the U.S. helicopter was clearly a hostile act," Pentagon spokesman Fred S. Hoffman said. "The helicopter crews fired in self-defense."

It was the second serious shooting incident involving the United States and Iran in the last three weeks. On Sept. 21, U.S. forces attacked the Iran Ajr, saying that the ship was laying mines in international waters. The ship was subsequently destroyed and its surviving crew members were returned to Iran.

President Reagan was doing "routine paper work" in the Oval Office at 3:30 p.m. when Army Lt. Gen. Colin L. Powell, his deputy national security adviser, informed him of the attack. The president displayed no outward reaction, according to presidential spokesman Marlin Fitzwater.

Staffers immediately began an inquiry into whether the president should invoke the War Powers Resolution, but Fitzwater stressed that the White House viewed the incident as "unprovoked" by U.S. forces and "defensive."

The helicopters were on "routine patrol," he said. "This was a case of direct provocation."

"After each of these incidents we conduct a review {of the War Powers Resolution}," he said.

Members of Congress will be briefed on the incident, Fitzwater said. "We will comply with the spirit of the {War Powers} law by providing full and detailed consultations with Congress."

The Senate today is to resume debate on whether to invoke the War Powers Resolution or some modified version of it that would give Congress the power to limit presidential authority to commit military forces in the gulf.

Although the debate was scheduled before yesterday's incident, the sinking of the Iranian vessels will likely heighten the debate.

Sen. Paul Simon (D-Ill.), a candidate for the Democratic presidential nomination, said yesterday's conflict is a "case study" for invoking the War Powers Resolution, which applies "when our forces encounter 'hostilities or imminent hostilities.' "

Sen. Lowell P. Weicker Jr. (R-Conn.) said in a Senate floor speech that "We all look like fools, fools that are disregarding the law."

But Sen. Sam Nunn (D-Ga.), chairman of the Armed Services Committee, said that based on the facts "as I now understand them . . . American forces were entirely within their rights in defending themselves."

Fitzwater said the U.S. decision to return to Iran the sailors captured from the Iran Ajr was an indication, but not a definitive one, of what the United States will do this time.

{Iran today denied that its gunboats had fired first, Reuter reported. In a dispatch by the Iranian state news agency, monitored in Nicosia, Tehran maintained its vessels had been subjected to a "savage U.S. attack," Reuter said.}

In a separate incident, a U.S. helicopter operating from the guided-missile frigate USS Ford reported shots were fired from an Iranian oil rig in the southern Persian Gulf about 120 miles east of Bahrain yesterday afternoon, officials said. The helicopter crew could not determine whether the shots were fired at it and did not return any fire, according to officials.

The helicopter left the area without further incident and there were no injuries or damage, officials said.

U.S. intelligence sources have reported an unusually high level of Iranian gunboat activity in the northern Persian Gulf for about two weeks, officials said. Last weekend, about 50 gunboats in the area launched what appeared to be an attempt to attack a Saudi oil facility. The gunboats were turned back by Saudi frigates and airplanes as U.S. ships steamed toward the area. Farsi Island has been a base for Iranian Revolutionary Guard gunboat attacks against commercial ships.

Pentagon officials said one of the destroyed Iranian boats is believed to be a Swedish-built Boghammer, a 43-foot patrol boat with a top speed of about 60 miles an hour. The Iranians purchased a large number of the craft from Sweden and Swedish officials have been investigating reports that they have been converted into attack boats.

Pentagon officials said the other two destroyed Iranian boats were smaller patrol craft. Officials said they do not know what type of weapons were fired at the U.S. helicopters. The patrol helicopter had spotted visible tracer rounds being fired from the gunboats, according to the officials.

Pentagon sources said the helicopters responding to the observation chopper's call for help were MH6 gunships of the same type of Army special operations craft that fired at the Iran Ajr last month.

Pentagon officials said the rescued Iranian survivors were given medical attention and were being taken to the assault ship USS Raleigh late last night.

Staff writer Bill McAllister contributed to this report.