Lebanese President Amin Gemayel and Prime Minister Rashid Karami flew to a jubilant welcome here today, a day after the departure of Israeli troops, and praised the "national resistance" fighters whose attacks helped pressure Israel into leaving.

Gemayel, whose fellow Lebanese Christians had once been allies of Israel, praised the "noble, heroic national resistance" that he said "became the symbol of Lebanese unity and liberation."

The Lebanese Army fanned out today through the area east and south of here relinquished by the Israelis in the first phase of a three-stage withdrawal from Lebanon. Troops took positions 17 miles south near the bridge over the Litani River just north of the port city of Tyre, which is 15 miles north of the Israeli border.

Israeli troops at their new line on the south bank allowed foot traffic and some vehicles in and out of Tyre.

[Israel's military command said one Israeli soldier was killed and three wounded today when a roadside bomb exploded east of Tyre, The Associated Press reported.]

While Sidon residents enthusiastically welcomed the president and other visiting officials today, many local leaders made it clear that they were proud of the fact that they had managed to stick together during the 32-month Israeli occupation without help from the central government. Now they were determined, they said, not to repeat mistakes committed in other parts of Lebanon, where communal violence has followed the withdrawal of Israeli or other outside forces.

Nazih Bizri, a prominent Sidon political figure and former Cabinet minister, also observed, as he received a stream of well-wishers in his living room, "We want the state to be as strong as the resistance."

The local dignitaries tactfully made no mention of the fact that Gemayel was a new convert to the virtues of the resistance. Just a year ago, the Shiite Moslems, the core of the anti-Israeli fight, humiliated Gemayel by splitting the Army and taking over west Beirut.

The president's change of heart was indicative of the bandwagon effect of the resistance even on Christian Lebanese now that they see the invaders leaving.

But while the local leaders were pleased by Gemayel's unannounced visit, their main concern lay closer to home. Mindful of the many possible pitfalls facing Lebanon's third-largest city -- a miniature of this country's ethnic and religious patchwork of communities -- Bizri and others were taking no chances.

With a mixed population of Sunni and Shiite Moslems, plus a large Palestinian refugee camp and a Christian minority, the Sidon leaders say they strongly suspect that the Israelis are working through "stay-behind" agents to provoke the communal violence that many Israelis predicted would follow their departure.

Well before the Israelis left, the Sunni Moslems, who traditionally have run Sidon, began jawboning the other communities. They preached the virtues of compromise, mutual concession and letting bygones be bygones, and reportedly did not avoid the threat of coercion if other arguments failed.

For example, four days ago, Bizri, a small, forceful man, summoned leaders from nearby Palestinian refugee camps and won a promise that they would obey the Sidon leaders even if that ran counter to orders from the Palestine Liberation Organization.

If the Palestinians had problems, especially with Christians who allegedly had mistreated the refugees, the Palestinians should consult Bizri, not take justice into their own hands, they were told.

Bizri explained that his method relied not on police or soldiers but on "friendly relations ensuring security among our communities."

Thus, months ago when the bodies of three Sunni Moslem men were found dumped in a Christian neighborhood, Bizri talked the bereaved parents out of retaliation. He argued that nothing could bring the men back to life and that retribution would only serve Israeli interests in stirring up communal trouble. There were no reprisals.

The Christians in the Lebanese Forces militia quietly stashed away their arms and uniforms and emptied their offices.

Bizri's preeminence comes after a long eclipse during which a rival Sunni family held sway for 20 years with their Palestinian allies.

Ironically, Bizri owes his comeback to the Israeli occupation and a car bomb that last month severely wounded his Sunni rival, Mustafa Saad. The traditional leadership is convinced that the Sunni urban majority here has little to fear from the Shiite Moslems who dominate the rest of the south and provide most of the resistance fighters.

But the Shiite leaders have made it clear that they will fight rather than allow the Palestinians to rearm and create problems as they did before the Israeli invasion in 1982.

"If the Palestinians so much as open a single office in Sidon," a calm young notable warned, "the Shiites will burn it down within an hour."

The Shiites are expected to tolerate no violence in the refugee camps between Palestinians loyal to PLO Chairman Yasser Arafat and pro-Syrian rivals.

But prohibitions against violence and reprisals apparently will not protect Israeli collaborators. Three suspected collaborators were killed yesterday. Today a major Israeli agent known as "captain" Mahmoud Hebleh was seen, clad in pajamas, being hustled into a car trunk on a Sidon street and driven away by armed men.

Bizri coldly said the Israeli agents for the most were not important men, but rather criminals who had escaped from jail or were afraid of being rearrested. He said that during the occupation, 75 Sidon residents had been killed, 500 shops closed, about 400 houses dynamited and hundreds of persons arrested.