JERUSALEM, SEPT. 16 -- Three Israeli soldiers were killed last night and four wounded just inside the Lebanese border when they were ambushed by guerrillas reportedly attempting to penetrate into Israel, the Army reported today.

It was the largest number of Israeli troops killed in a single incident since Israel withdrew most of its forces from Lebanon in 1985 and unilaterally established the six-mile-deep buffer area it calls a "security zone" on the Lebanese side of the border.

Foreign Minister Shimon Peres told reporters, "There is no doubt this is the most painful incident since the Israeli Army withdrew from Lebanon," Reuter reported. But he said the clash did not warrant any change in Israel's Lebanon policy.

The clash took place on the rocky western slopes of Mt. Hermon, northeast of the Israeli border town of Metullah, an area of ditches and small valleys that provide ideal cover for such an attack, the Army spokesman said.

The ambush was staged by 12 to 15 guerrillas, members of the Lebanese National Resistance Movement, a combined group of Palestinian and Lebanese leftists sponsored by Syria, according to the spokesman's office. One of the guerrillas was wounded and later captured.

After the ambush large numbers of Israeli soldiers and allied Lebanese Christian militiamen, supported by tanks and helicopter gunships, searched the area for the gunmen, strafing potential hiding places. The operation lasted eight hours but the remaining guerrillas apparently escaped.

The soldiers found pamphlets indicating the group had planned to take civilian hostages in Israel and bargain for jailed guerrillas, the Army spokesman's office said. Israeli radio reported that weapons dropped by fleeing guerrillas included automatic rifles, explosives and rocket-propelled grenades.

In a separate incident this morning in Rashayya, Lebanon, Israeli radio said, three guerrillas were killed when Israeli infantry and helicopter gunships pursued a guerrilla squad after repelling its attempt to approach Israel's border.

A wounded member of the 15-man Palestinian-Lebanese squad told Reuter in the southern Bekaa Valley that there was a gun battle before the squad retreated from the edge of the security zone.

Israel pulled most of its forces out of Lebanon and established the security zone three years after it invaded the country in an attempt to drive out Palestinian guerrillas who had launched attacks on Israeli villages from there. The zone is patrolled jointly by Israeli forces and the 1,500-man South Lebanon Army, a militia armed by Israel.

Meanwhile, on the Israeli-occupied West Bank, authorities detained without charge three Palestinian activists alleged to be recruiters for outlawed resistance movements and seized nine others alleged to be organizers of protests planned for later this week, according to Israeli radio.

The three are being held under six-month detention orders, while the other nine are under nine-day arrest orders. The detentions reportedly are an attempt to thwart commemoration of the fifth anniversary of the massacre of Palestinian refugees at the Sabra and Shatila camps in Beirut.

Special correspondent Nora Boustany reported from Beirut:

Two leading Syrian allies in Lebanon escaped assassination attempts late yesterday, one day after a pro-Syrian Lebanese journalist was shot and seriously wounded, Lebanese security sources said.

Eli Hobeika, ousted in January 1986 as commander of the Lebanese Forces Christian militia, was injured, along with Greek Catholic Archbishop Andree Haddad in Zahlah when a bomb went off in the bishop's offices. Earlier in the day a bomb in Sidon wrecked the clinic of Dr. Nazih Bizri, a Sunni Moslem legislator, wounding him slightly.