BEIRUT, Lebanon (AP) _ Guerrillas detonated a roadside bomb near a patrol of Israeli-allied militiamen in southern Lebanon on Wednesday, security officials said, sparking retaliatory shelling. Five people from both sides were wounded.

A foot patrol of the South Lebanon Army, which is backed by Israel to help its troops control a border zone in southern Lebanon, was on a routine morning patrol before opening the crossing point of Kfar Tibnit when Hezbollah guerrillas detonated the bomb, the officials said.

Two militiamen were injured _ one seriously and one moderately. They were both hospitalized, added the officials, speaking in southern Lebanon on condition of anonymity.

A statement issued in Beirut by Iranian-backed Hezbollah guerrillas claimed responsibility for the roadside bombing.

Shortly after the attack, militiamen closed the Kfar Tibnit crossing, one of several checkpoints linking the occupied area with the rest of Lebanon. They also responded with artillery and machine gunfire, targeting areas across from their position, the officials said.

Mohammed Othman, an off-duty Lebanese army soldier, was at home in the village of Kfar Tibnit, which is across from the SLA outpost and about six miles north of the Israeli border, when he sustained shrapnel wounds in his face from the militia fire. He was hospitalized as well.

Two Lebanese civilians were also wounded in Kfar Tibnit. One was said to be in serious condition with shrapnel wounds to the head.

Hezbollah guerrillas are fighting to oust some 1,500 Israeli soldiers and 2,500 SLA militiamen from the border zone held by Israel since 1985. Israel, which says it maintains the zone to guard against cross-border guerrilla attacks, has said it will withdraw its troops by July.