BEIRUT, Lebanon (AP) _ An Israeli helicopter gunship fired a rocket at the harbor of south Lebanon's main port city today, destroying a boat and wounding four people, police said.

In Tel Aviv, the Israeli military command reported the destruction of the vessel, describing it as ''a terrorist boat.'' It did not elaborate.

The lone rocket slammed into the southern dock at the port of Sidon, south Lebanon's provincial capital. A Lebanese police statement described the four casualties as civilians and the vessel as a fishing boat.

The attack came shortly after four Israeli helicopter gunships and two jet fighters carried out ''mock raids'' around Sidon, drawing heavy anti-aircraft fire from leftist Lebanese militiamen and Palestinian guerrillas, the police statement said.

The militiamen and guerrillas fired anti-aircraft guns and rocket-propelled grenades at the helicopters, but no hits were reported, a police spokesman in Sidon said.

The Israeli command, in a brief communique, said all the helicopters returned safely to their bases. The command did not mention any jets being sent into Lebanon.

The Lebanese police spokesman, who declined to be identified, said a rocket-launched grenade fired by local forces exploded in the harbor vicinity, and that three civilians were wounded.

The spokesman denied private radio reports that an Israeli warplane was shot down in south Lebanon today.

In Tel Aviv, the Israeli military command also denied the report.

The police spokesman said predominantly Sunni militiamen of the leftist Popular Liberation Army fired Soviet-made surface-to-air SA-7 missiles at the helicopters.

The police official said the helicopters flew out over the Mediterranean shortly before dusk and landed on an Israeli navy vessel off the coast.

Sidon is a predominantly Sunni city 20 miles from Beirut. Two major Palestinian refugee camps are located on its fringes.

On Monday, Israeli helicopter gunships raided the headquarters of a Libyan- sponsored Palestinian guerrilla group in Sidon's Ein el-Hilweh refugee camp.

Police said four Palestinians were wounded when Israeli air-to-surface rockets demolished the headquarters of the Palestine Popular Struggle Front.

That raid was Israel's 15th air strike into Lebanon this year. It came 24 hours after Israeli jetfighters attacked positions of the Palestine Liberation Organization's Fatah faction in the same area.