A move by Lebanon's fractious leftist militias to fill the power vacuum caused by the departure of Palestinian guerrillas from West Beirut has become a growing threat to the full implementation of the evacuation agreement and a major challenge to the authority of President-elect Bashir Gemayel.

Israel's military chief of staff, Lt. Gen. Rafael Eitan, warned today that his country would not allow one of the most powerful of the Moslem leftist militias, the Morabitoun, to remain in Beirut because it is "no different from any other terrorist organization as far as Israel is concerned."

It was not clear whether Eitan's statement represented Israeli government policy or merely the wishes of a military leader, Washington Post correspondent Edward Walsh reported from Jerusalem.

Various leftist militias have quickly occupied positions in West Beirut vacated by the departing Palestine Liberation Organization. The groups mistrust Gemayel, a rightist and their bitter enemy in the 1975-1976 civil war. They also are skeptical about the Lebanese Army, which they view as a tool of Gemayel's Christian-dominated Phalangist Party, and thus may resist reestablishment of government control in Beirut by the Army as provided for under the evacuation agreement.

Eitan and other sources here said the issue of the leftist militias had been taken up with U.S. special envoy Philip C. Habib, architect of the withdrawal accord.

Eitan, according to an Israeli radio broadcast, said that the Morabitoun, at least, would have to be pulled off the sensitive Green Line, a desolate, war-shattered area that separates Christian-controlled East Beirut and Moslem-controlled West Beirut.

Meanwhile, the evacuation of the PLO continued with the departure of about 1,700 more guerrillas by land and sea. There were reports that PLO Chairman Yasser Arafat, the last high-level Palestinian leader in Beirut, would travel to Greece.

Israeli Prime Minister Menachem Begin, seeking to demonstrate that Israel's invasion of Lebanon has freed northern towns from the threat of Palestinian artillery attacks, began a one-week vacation in the town of Nahariya, six miles south of the Lebanese border.

The evacuation agreement painstakingly negotiated by Habib did not mention withdrawal of any of the many leftist and rightist militias from Lebanon because their members are Lebanese.

The issue of the leftist militias became urgent last week when the Palestinian guerrillas unexpectedly turned over their heavy arms to the militias in apparent violation of the Habib agreement. Israeli officials said after the arms transfers became known that as far as they were concerned the evacuation was still "going according to schedule." Israeli reticence appeared to reflect a strategy of not upsetting the process while the bulk of Palestinian fighters were still being withdrawn.

"The Palestinian struggle here may be over," said Abu Khatib, a member of the Morabitoun, as he watched one of the last Palestinian units leave West Beirut. "Now we are back to our own Lebanese struggle, and it is far from over."

Like units of other Lebanese militias in other parts of the city, Abu Khatib and his men quickly occupied vacated Palestinian positions in the warren of destroyed buildings along the Green Line.

The militias' move to fill the power vacuum in the war-weary western sector of the capital threatened the full implementation of the evacuation agreement worked out by Habib that brought to an end Israel's destructive 10-week siege of West Beirut. The Habib plan envisioned the reestablishment of government control in West Beirut by the 20,000-man Lebanese Army reconstituted, but untried, since its civil war collapse.

Moslem leaders were stunned by the election of Gemayel, a parliamentary decision they tried hard to block. They still consider the Christian leader as their most implacable enemy following the civil war and its long, equally violent aftermath. They have also balked at the evacuation plan because they, and the militia chieftains they command, believe that Gemayel's forces control the Army and would use it to dominate them. The militias' moves to take command of abandoned PLO positions now presents a new challenge to Gemayel.

Prime Minister Shafiq Wazzan, under Habib's coaxing, has sought to get a compromise agreement with the city's Moslem leaders that would allow, at least, the national police to begin establishing security in West Beirut with the Army being kept in its barracks, except in emergencies, to avoid offending the Moslems.

To West Beirut residents who remember the anarchy that reigned in their city in the final days of the civil war, the thought of the city coming into the hands of the dozens of armed groups so long overshadowed and kept under control by the PLO has brought fears of a past as ugly as the recent Israeli siege.

"The irony is that it was the PLO, and the Syrian Army peace-keeping force ordered by the Arab League in 1976 to quell the war, that has provided what little security there has been here," said a local businessman who did not want his name used, as he recalled how joint PLO and Syrian forces policed the city streets, mediated disputes and, when that failed, forcibly halted gunfights among rival armed groups.

"If we are not careful we could be facing a return of the rule of the armed thugs," he added.

What is certain is that such organizations as the Morabitoun, the Shiite Amal militia and such major groups as Druze sect leader Walid Jumblatt's own private force still pose a threat to anyone trying to impose his will on West Beirut.

This is even more true now that the PLO has turned over much of its heavy weaponry -- its few tanks, antiaircraft batteries, mobile Katyusha rocket launchers, field artillery and mortars -- to its local allies.

A year ago Western diplomats and Lebanese sociologists trying to make sense of factionalism of West Beirut politics had amassed the names of more than 40 different armed groups--some large like the Morabitoun, others groupings of only dozens of men loyal to a local political or neighborhood leader. Today the best estimate is that there are no more than 24 such groups of any note.

Estimates of their actual combat strength vary as widely as their numbers, but Lebanese sources here put the figures at anywhere from 8,000 to 20,000.

By far the largest group in the city is the Morabitoun, which has been so evident along the confrontation lines during the PLO retreat. Inspired by the Arab nationalism of the late Egyptian president Gamal Abdel Nasser, the Morabitoun are said to command anywhere from 1,500 to 5,000 men.

Morabitoun leader Ibrahim Koleilat, 41, has been one of the most determined opponents of accepting the authority of the new president, who is to take office Sept. 23. Koleilat views Gemayel as a creature of the Israelis, who have been reported to have been supporting Gemayel and his militia since the civil war.

"As long as our country is occupied by the Israelis," he said in an interview, "as Lebanese we reserve the right to stay armed as long as our country is under occupation and our people are threatened."

There are at least six other splinter Arab nationalist groups, each with its own forces, its own neighborhood bases and zones of control.

The only umbrella organization that tries to control and coordinate these groups is the National Movement, a grouping of about a dozen parties and factions, each with its own armed militias. The movement is headed by Walid Jumblatt, 33. Since the assassination of his father in 1977, Jumblatt has been the uncontested leader of Lebanon's Druze sect and the head of the country's Progressive Socialist Party.

The biggest militia force outside the Movement is Amal, the militia of Lebanon's 900,000-strong Shiite Moslem community. In reaction to the historical dominance of the country by Christians and Sunni Moslems, Amal was founded in 1977 by Imam Moussa Sadr, the Iranian spiritual leader of the Lebanese Shiites who later mysteriously disappeared and is presumed to have been murdered during a visit to Libya.

Fired by memories of Sadr and inspired by Iran's Ayatollah Ruhollah Khomeini, Amal has become a formidable force in recent years. Although much of its strength -- estimated by some as high as 30,000 -- is in Lebanon's traditional bastions of Shiism in the Bekaa Valley and the southern area of the country, it is believed to have 4,000 to 5,000 armed men in Beirut.

Jumblatt's private Druze militia is considered the third most important force.