Shiite Moslem militiamen and Palestinian guerrillas entrenched in refugee camps at the southern edge of Beirut fought for the fourth day today, and fighters crouching behind deserted sheds at the entrance of the Shatila camp expressed fears that the fighting would spread to other parts of the Lebanese capital.

On Friday, friction between the Shiite Amal militia and Palestinians deteriorated into gun battles, which have so far claimed 14 lives and wounded 30 persons. Sniping and sporadic combat kept the main entrance to the Shatila shantytown closed to pedestrians and automobile traffic.

A cease-fire announced by Amal movement leader Nabih Berri broke down in the afternoon, only two hours after the Shiite leader announced that all pretexts for the fighting were "imagined."

Berri said everyone's "credibility has become shaky because shots were being fired aimlessly." He said that the violence was "only widening differences between people supposed to have the same cause." The recurrence of combat in the camps, although it has been comparatively light so far, has heightened concern that there might be a repetition of the bitter camp war that left about 600 persons dead and more than 2,500 wounded last May and June.

Amal commanders milling nervously in narrow alleys at Shatila's southern exit complained that Palestinian guerrillas holed up inside were violating the cease-fires. "Stay with us and you will see who is violating the truce," said an Amal commander, who gave his name as "Abu Mohammed." At Shatila's northern entrance, however, Palestinian guerrillas charged that Amal fighters were shooting at them.

Abu Mohammed had to yell at his men to keep them from responding to sniper bullets whizzing across Shatila's main road a few yards away.

"They are not committed to keeping things quiet," Abu Mohammed complained. "We want to end this state of war. We are making decisions to stop the fighting, but we cannot find anyone willing to implement them on the other side."

Asked if the Shiite-Palestinian conflict could spread beyond the camp, Abu Mohammed answered: "This is what we fear." Moslem and leftist groups, opposed to Amal's dominance in west Beirut, have grown impatient during the past few months and may yet join forces with Palestinian fighters to loosen Shiite leader Berri's hold over the Moslem half of the Lebanese capital.

Abu Mohammed said one of the reasons for this "latest flare-up" was to embarrass the Amal leadership before an Amal conference and Politburo elections scheduled for Friday, and to help "gather forces to confront" the Shiite movement.

"We should all be fighting Israel and the Christian militias," he added. One of the main topics on the Amal congress agenda is security in southern Lebanon. Salah Khalaf, number two to Palestine Liberation Organization Chairman Yasser Arafat in the Fatah command, was quoted as saying two weeks ago that all Palestinian guerrillas expelled from Lebanon in 1982 were "back in positions from where they can resume attacks against the Zionist enemy." The disclosure of Khalaf, who also is known as Abu Iyad, coincided with reports that Arafat loyalists were beefing up their presence in southern Lebanon and coordinating with radical Shiite groups for anti-Israeli activity there.

Amal has banned guerrilla operations that are not under its direct supervision and has discouraged activists from launching hit-and-run attacks in areas under its control. Palestinian sources in Beirut said the Shiite Amal movement would try to keep guerrillas hemmed inside the camps to prevent them from either slipping out and allying themselves with other Moslem groups in west Beirut or filtering back to southern Lebanon.

Amal is under pressure from Shiite extremists because of its moderate stance toward Israel and is fearful that a massive return of Palestinian guerrillas to Beirut or the south could provoke another Israeli invasion.

Yesterday, the Lebanese Red Cross removed the bodies of three Palestinians from the Sabra and Shatila camps. Abu Mohammed blamed the Sunni Moslem-commanded Lebanese internal security force for lax control at the camps' entrances. He said the internal security force, or Lebanese police, were not searching cars and trucks thoroughly, resulting in arms being smuggled into the camps.

Shiite Amal militiamen and Shiite soldiers from the Lebanese Army 6th Brigade, who joined the battle last year, were asked to withdraw from the camps' periphery in a Syrian-mediated truce in June. Since then, however, Amal militiamen often have gone in to search for arms.