Mayor Bassam Shaka of Nablus, whose legs were blown off in an assassination attempt seven months ago, returned to a hero's welcome in his home town today and assumed his place as undisputed leader of the Palestinian nationalist movement in the Israeli-occupied West Bank.

Thousands of West Bank Arabs, defiantly singing banned Palestine Liberation Organization songs and hoisting the PLO flag, filled the streets and mobbed Shaka as his motorcade inched toward an emotional homecoming rally at the town library.

There, his followers slaughtered a sheep in the traditional Arab celebration and bore Shaka on their shoulders to a tumultuous reception inside, where he vowed to continue the struggle for Palestinian independence.

"We will always fight for our national rights, until we have a Palestinian state. . . One day we will be victorious, all together under the flag of the PLO," Shaka declared to the wildly cheering crowd.

As they did for the Dec. 25 homecoming of Mayor Karim Khalaf of Ramallah, who lost a foot in a car bombing simultaneous with the one that crippled Shaka, Israeli troops withdrew today and watched the celebration from a discreet distance.

A biting winter rain failed to dampen the enthusiasm of the welcomers as Shaka, who has spent the last five months in London undergoing treatment and the fitting of artificial limbs, crossed the Damiya Bridge from Jordan and headed home.

Riding in a taxi, he was followed by 50 cars full of relatives and friends. When they reached the throngs in one of Nablus' main streets, the crowd sang nationalistic songs and chanted PLO slogans, including "Palestine is Arab. We defend it with rifles. It belongs to my father and sons. Zionism is out."

Normally, such demonstrations are prohibited. But sources in the military government said it had been decided to allow the homecoming to proceed unless it turned violent.

Only twice did jeeploads of Israeli soldiers cruise through the crowded street in front of the library, and they were jeered and whistled at by Arab demonstrators. A Palestinian flag -- banned in the West Bank -- was briefly unfurled but them removed by Arabs before Israeli troops attempted to remove it.

As Shaka was carried into the building, the throat of a sheep was cut and the animal was held up while blood ran into the rain-drenched pavement as a symbol of happiness.

"My land, my land. We sacrifice ourselves for you, Bassam, in blood and spirit," the crowd chanted as Shaka, precariously perched on the shoulders of burly fire brigade members, was carried to his celebration.

More than any other West Bank mayor, Shaka has been propelled by events into a position of unchallenged leadership in the West Bank. Many Palestinians are anxiously waiting to see whether the military government will allow him to fulfill that role.

Shaka began to assume the image of a folk hero in November 1979, when the Israeli government unsuccessfully sought to deport him for making allegedly inflammatory statements in a private meeting with the West Bank military governor. When a transcript showed that Shaka had been misquoted, the government dropped the deportation proceedings.

On June 2, a month after six members of a civilian Jewish settlement were machine-gunned to death in an Arab ambush in Hebron, bombs went off in the cars of Shaka and Khalaf, crippling both mayors. Occupation authorities have blamed extremist Jewish settlers, but no arrests have been made.

Shaka, a charismatic figure and strong leader even before the attempted deportation and bombing, has acquired the name "Abu Nidal," which in Arabic means father of the struggle, and it is widely assumed by West Bank Arab nationalists that his popularity entitles him to the mantle of Palestinian leadership in the occupied territories.

However, the National Guidance Committee, of which Shaka was one of the dominant members, has been dismantled as a result of the car bombings, the deportation of Mayors Fahd Kawasme of Hebron and Mohammed Milhem of Halhoul, and the government's policy of restricting other mayors to their towns.

The major question is whether Shaka's return will inspire the other leaders enough to attempt to reconstitute the old nationlist leader or whether the Israelis will continue to prohibit any collective activities.

Shaka said today the National Guidance Committee, which was formed after the 1978 Camp David accords to promote nationalism and oppose the Israeli-Egyptian peace treaty was signed in March 1979, exists "to protect our people from the arrogance of the Israelis in the occupied territories, and I think it will persist in bearing responsibility despite the many members detained, and many deported and many others chased out."

Shaka said he held the "Israeli authorities and Israeli government" responsible for the car bombings and said he had been threatened with physical harm before the blasts by then-defense minister Ezer Weizman.

"There was a general tendency of the authorities to punish the mayors for their solidarity with the people," Shaka said.