Israeli troops completed the first phase of a planned three-stage withdrawal from southern Lebanon today as thousands of jubilant citizens cheered the Lebanese Army, which marched in to fill the vacuum.

The pullback, which was completed two days ahead of schedule and which Israeli officials said took place without incident, marked the end of 32 months of occupation of southern Lebanon's largest city. In addition to the 1,800 men of the Army's largely Shiite 12th Brigade, Lebanese also greeted the National Resistance, the previously anonymous Shiite underground. Their increasingly lethal attacks influenced the Israelis to accelerate their withdrawal.

The well-executed Lebanese Army takeover was greeted by Lebanese Prime Minister Rashid Karami as a "historic day" and provided the beleaguered government with a badly needed shot in the arm.

By nightfall, the Lebanese troops were deployed near the Zahrani River, four miles south of Sidon, and at Kfar Falous, five miles inland in the foothills of the Mount Lebanon range.

First timidly, then with growing fervor, rejoicing residents of this capital of the south poured into the streets. Men, women and children waved red, white and green Lebanese flags and clambered aboard tanks, armored personnel carriers and Army trucks as car horns blared.

The civilians pelted the troops with rice in a traditional Lebanese greeting. One soldier perched atop a bulldozer decorated his rifle barrel with a red rose.

The National Resistance, whose men and red, green and yellow flag were much in evidence here, were expected to use Sidon and the town of Sarafand farther south along the Mediterranean as staging areas for stepped-up attacks against the Israelis.

Even now the main resistance center is south of the Litani River, marking the new northern defense perimeter along the Mediterranean, with the nucleus centered on a cluster of Shiite villages northeast of the port of Tyre.

Military specialists predict that the Israelis may hasten the second phase of their withdrawal -- tentatively scheduled for April -- by evacuating that area and the pocket around Tyre. Instead, they would keep a line farther east running through the area now patrolled by U.N. peace-keeping forces south of the Litani and then northward to Jezzin and the electronics base atop Mount Baruk.

Further complicating the Israeli task has been the virtual collapse of their surrogates, the so-called South Lebanon Army, which they clothe, arm and pay. The Israelis have acknowledged widespread desertions in its ranks.

Other sources reported that the Israelis had told their Lebanese collaborators in Tyre to retreat to safer areas as the National Resistance has singled them out for retribution.

In contrast, the often belittled Lebanese Army, which had been waiting just north of the Awwali for the Israelis to leave as they had promised by Feb. 18, performed fautlessly.

Within minutes of the Israeli rear guard's departure, for example, Lebanese units moved in to protect the large Palestinian refugee camps of Ain Helweh on the coastal plain and Mieh Mieh, atop the hills just to the east.

As Israeli jets dropped leaflets congratulating themselves on their 32-month occupation and made screeching, low-level passes, 40-year-old fisherman Ahmad Hamad told reporters at Mieh Mieh, "This is the happiest day in my life."

Asked if he joined in pelting the Lebanese soldiers with rice, he smiled and said, "No, we had none, but we threw them our love, and they shook our hands."

Complaining that until last Thursday the Israelis had fired heavy machine guns into Ain Helweh, Mohammed Abu Bilal, 25, said he was "happy they have gone, and may rockets and shells accompany them all the way back to the border."

Asked about rumors of forthcoming violence between rival Palestinians loyal to Palestine Liberation Organization leader Yasser Arafat or his pro-Syrian rivals, he said, "We do not want any foreigners here. Here we are one family, like fingers of a hand."

Pessimists fear that such clashes could ensue if the anti-Arafat rebels rumored to be in the Chouf Mountains just to the north were to move into the camps. In turn, such violence might ignite fighting among the various Lebanese factions, which appear determined now to avoid such violence.

But today the mood for once was decidedly upbeat for Palestinians and Lebanese residents of this city of about 100,000. Once a Sunni Moslem center, Sidon increasingly has become home for Shiite villagers fleeing violence in their villages farther south.

"This is a victory for us," Ziad Abdel Jawad, 19, shouted as he drove north toward the Awwali bridge, where the Israelis had made the Lebanese wait for days before being allowed to travel 25 miles north to Beirut. "I didn't think this would ever happen."

Watching the crowd cheer itself hoarse as the Army deployed along Sidon's main street, a delighted Army officer said, "The Army is going to be all over Lebanon. This is what the people want, and that is the way it is going to be."

Such self-confidence contrasted with the gloom following the car-bomb explosion Jan. 21 that blinded Sidon's Sunni leader Mustafa Saad, killed his daughter and wounded his wife.

That incident seemed to confirm Israeli assertions that the south was doomed to more bloodshed such as that between Christians and Druze following Israel's withdrawal from the Chouf Mountains in September 1983.

But this time even the once pro-Israeli Christian minority in the south rallied around the Shiites and found it expedient to blame Israel for the car bomb.

Political and religious leaders worked hard to ensure that the departure of the Israelis would take place in an orderly fashion.

Fuad Abu Nader, the commander of the Christian militia called the Lebanese Forces, said recently that the southern Christians would not leave the Jezzin area and serve as "border guards" for the Israelis along the international frontier. If pushed out of their homes, he said, they would come to the main Christian heartland north of Beirut.

That change of heart appeared to reflect the collapse of Israeli dreams of reestablishing an allied, Christian-dominated Lebanon and the Christians' own growing disillusionment with the Israelis.