Prime Minister Menachem Begin's ruling Likud coalition narrowly averted falling tonight in a parliamentary no-confidence vote tied in large part to government policies in the occupied West Bank and the current wave of violence there.

Israel's parliament, the Knesset, was deadlocked in a 58 to 58 vote on the no-confidence motion raised by the opposition. Begin said he wanted to resign and force a new national election, but he was overruled by his Cabinet in a late-night meeting.

The tie vote, accompanied by the defection of one coalition member and opposition by two minor parties that had once supported the government, underscored the fragility of the Likud party's leadership and raised anew speculation that Begin would soon seek a new election to strengthen his coalition's razor-thin majority.

Three members of the Likud-splinter Tehiya (Renaissance) Party and two members of the late Moshe Dayan's independent Telem Party voted against Begin in tonight's ballot, imperiling the coalition. Tehiya sought to use the no-confidence vote as leverage to fulfill its ambition to scuttle Israel's final withdrawal from the Sinai Peninsula scheduled for April 25. Telem reportedly sought to use the vote to force Begin to agree to a government of national unity that would encompass some parties not now included in the coalition.

But it was the defection of Rabbi Haim Druckman of the National Religious Party, who also split with the government because he opposes the withdrawal from the Sinai, that prevented the prime minister from getting a majority.

The votes by Druckman and the two small parties were not tied to the violence on the West Bank, occupied by Israel since the 1967 Middle East war, but the opposition repeatedly raised that issue during the lengthy and occasionally raucous debate. Rioting has spread through the area since Thursday, when Israel dissolved the municipal council of El Bireh after it refused to cooperate with an Israeli civilian administrator who is seeking to dilute the influence of militantly nationalist Palestinian mayors.

Disturbances continued today, but on a smaller scale than in the past four days. Two Palestinian youths have been killed and 15 injured in clashes with Israeli security forces. A third Palestinian was shot dead March 16 by Israeli settlers, but his body was not discovered until Friday.

Defending his policies in the parliament, Begin turned once to former prime minister Yitzhak Rabin of the Labor Party and shouted, "My friend, Yitzhak Rabin, was there no shooting when you were prime minister?" At another point, Begin declared, "We're trying to restore law and order--do you call that a military dictatorship?"

In addition to Begin's West Bank policies, the opposition motion criticized the annexation of the Golan Heights and the government's handling of relations with the United States.

In New York, where President Reagan was appearing to accept an award from the National Conference of Christians and Jews, Deputy White House Press Secretary Larry Speakes termed the Israeli vote "an internal matter."

"We are confident that the democratic process in Israel will work it out," Speakes said. "We are confident of the Israeli government's commitment to the Camp David peace process."

Cabinet ministers and Likud coalition floor leaders said Begin had repeatedly told them that he would regard a tie vote as a demonstration of no confidence in the parliament, and most of the Knesset members had expected him to resign.

Cabinet Secretary Aryeh Naor said the ministers and coalition leaders voted 12-6 to overrule Begin and added, "The Cabinet will continue to serve under the current circumstances under the direction of Mr. Begin . . . . The next step is to continue to serve this country and take care of this country's affairs."

Naor conceded that Begin could have resigned without Cabinet approval but said the prime minister preferred to follow the consensus of his ministers.

Under Israeli law, if Begin had decided to hand his resignation to President Yitzhak Navon, Navon could have either asked Begin to form a new parliamentary coalition or turned to other factions in the parliament and asked them to try to form a government that could gain the confidence of the 120-member house.

In any case, Begin would most likely have remained in power as head of a caretaker Likud government until new national elections could be held in no less than three months. During that period, the caretaker government could not be brought down in a no-confidence vote, according to the law.

Begin's Cabinet secretary attempted to put the best face possible on tonight's vote, depicting it as an "accident" resulting from shifting political alliances.

Referring to the opposition Labor alignment and the support it received from the Communist Democratic Front for Peace and Equality (DFPE) and Druckman, Naor said, "The opposition does not have a majority against the government, as was clearly demonstrated here tonight. Fifty-eight is not any positive coalition, and it was only because of an accident resulting from the vote of one rabbi and four Communists."

Supporting Begin in the vote were the Likud party with 48 votes, the National Religious Party with five, the religious splinter Tami Party with three, and the Agudat Yisrael Party with four. Two of the coalition's members were traveling abroad, however, leaving Begin with 58 votes.

The 48-member Labor Party added to its votes Telem's two members, Tehiya's three, the Communists' four, the independent Shinui Party's two and Druckman. It also had two members traveling abroad, leaving it with 58 votes as well.

The Shinui Party and the Communists routinely vote with the Labor Party against the Likud.

Defending the government's West Bank policies, Defense Minister Ariel Sharon accused previous Labor governments of "bringing about a situation where the Palestine Liberation Organization captured key positions in Judea and Samaria," the biblical names for the West Bank.

Turning to Labor Party leader Shimon Peres, who was former defense minister, Sharon said, "You, Knesset member Peres, caused the rise of the PLO in Judea and Samaria!"

As he spoke, Labor Knesset members shouted, "You are writing propaganda for the PLO."

Sharon accused Labor of adopting a "cup-in-hand" approach to its relations with the United States while, he said, the Likud had adopted a foreign policy from "a position of dignity."

As the debate was going on, West Bank demonstrators today continued to barricade main thoroughfares with rocks and burning tires, and pelted Israeli Army patrols with rocks. In the Balata refugee camp, near Nablus, an Army officer was injured when hit by a rock, authorities said.

There were also disturbances in a refugee camp near Bethlehem, and the nearby town of Halhoul was put under curfew.

Clashes with police and Army units spilled over into predominantly Arab East Jerusalem, as merchants there extended a two-day commercial strike in defiance of orders from military officials.

In a briefing to the Knesset's Foreign Affairs and Defense Committee earlier today, Sharon reportedly said he expects order to be restored in the West Bank within a few days. The defense minister was said to have told the committee that "moderate" Arabs in the West Bank are beginning to gain control of the situation with the help of security forces.