Trailing badly in the final days of Israel's general election campaign, opposition Labor Party leader Shimon Peres abruptly turned the tables on Prime Minister Menachern Begin tonight in their first face-to-face debate.

In a heated 40-minute televised duel in which the party leaders sought to sway the estimated 20 percent of the electroate that remains undecided for Tuesday's election. Peres seized the initative and, for the first time in the three-month campaign, appeared to put Begin on the defensive.

"I almost fell off of my chair," Begin said after Peres accused him of conducting a campaign of "violence and vulgarity."

The prime minster, who has dominated the campaign so far by capitalizing, on overwhelming public support for his hard-line position on the Syrian missile crisis and for the bombing of Iraq's nuclear reactor, appeared to be put off balance of Peres, who has conducted a low-key, even lackluster campaign.

Afterward, Begin told reporters that Peres had launched a "violent, vicious attack," adding, "A man who launches such an attack get a reply."

But Begin did little during the debate to turn aside Peres' persistent frontal attack, and Labor Party officials claimed a clear-cut victory.

Peres, who throughout most of the campaign has seemed dispirited and defeatist as a result of Sbegin's stunning comeback from the edge of political ruin six months ago, appeared to adhere closly to a strategy devised by his campaign staff to go on the attack and bait the prime minister into anger and confusion.

Labor Party campaign advisers said the strategy appeared to have worked, and expressed confidence that Peres is on his way to pulling even with Begin. a

In the debate, both Begin and Peres vowed to retain Israeli control over the occupied West Bank and the Gaza Strip to guarantee the security of the Jewish state.

But they differed sharply over each other's approach to reviving the dormant Camp David peace talks with Egypt and reaching agreements with other Arab neighbors. Begin said that under Peres' leadership, Israel would ultimately lose the Swest Bank to either Jordan or the Palestine Liberation Organization, while Peres warned that the Israeli-Egyptian peace treaty may be lost if Begin's Likud Party remains in power."

Peres said that he supports a policy of "power and statesmanship -- muscles and mind" and that Israel should offer to grant autonomy in the Gaza Strip first before dealing with the thornier issue of the West Bank.

"The Labor Party says the width of the country of Israel must be from the Jordan River to the [Mediterranean] sea," Peres said."No Katyusha rockets, no friction with the Arabs and no infiltration. I speak in the name of the Labor Party and not as a single person."

Begin also pledged continued Israeli control over the occupied areas, saying, "If you Arabs say they want to live in peace and want autonomy, they can do so under our soverignty and in an autonomous manner, but this is the homeland of the Jewish people and of course we shall increase the number of settlers in Judea and Samaria." Judea and Samaria are biblical names for regions of the West Bank.

It was one of the few occasions in the campaign on which either candidate has addressed the issue of the West Bank and Gaza. Peres, whose party platform advocates a return of about two-thirds of the West Bank in exchange for guarantees of continued Israeli security settlements in the strategic Jordan Valley, has avoided the issue for the most part, apparently sensing a national consenus that favors the Likud's hard-line approach toward the Arabs. For Begin, the West Bank issue has been overshadowed by the crisis over the Syrian missiles in Lebanon and the Israeli air attack on Iraq's nuclear reactor.

The reactor bombing came up only peripherally in the debate, with Begin calling it a "national salvation," and Peres saying that he had no doubt that Iraq intended to build nuclear weapons, but that he was opposed to the timing of the raid and to its execution before diplomatic efforts had been exhausted.

As for the missles in Lebanon, Begin argued that they represent a security risk for Israel because they would impede Israeli Air Force attacks against Palestinian guerrilla bases in Lebanon.

"We have not abandoned the policy of hitting back [at the bases]," Begin said. "We must have initiative -- our initiative."

One of the debate's most bitter exchanges occurred when Peres accused the Likud of waging a campaign of "violence and vulgarity," and charged, "Mr. Sbegin, you are the man who caused this affair." He was referring to repeated disruptions of Labor Party rallies by Likud supporters in recent weeks, including incidents of arson and assaults on campaign workers.

Responding, Begin cited the pre-independence history of Israel, and declared that members of his rightist underground movement, the Irgun, had been turned over to British authorities by members of the Labor Party movement.

"Tell us about the use of force and brutality!" Begin nearly shouted.

After the debate, both sides claimed victory.