JERUSALEM, AUG. 30 -- Israel's Cabinet bowed to pressure from both the United States and its own military leaders and economists today and narrowly voted to scrap the country's controversial $2 billion plan to build the Lavi, an advanced jet fighter.

The vote to kill the seven-year-old project was 12 to 11 with one abstention. It was considered an immediate victory for Foreign Minister Shimon Peres, leader of the left's Labor Party, who last week shifted his stance and decided to oppose continuation of the plane project, and a blow for Prime Minister Yitzhak Shamir, leader of the right-wing Likud bloc, Labor's partner in an uneasy governing coalition, who supported the project.

But the vote which was along party lines, with one exception, is expected to have long-term political echoes. The Lavi has commanded majority support in numerous opinion surveys indicating voters see it as a source of national pride and employment for several thousand skilled aviation workers. Some Likud leaders indicated tonight that they intended to portray the decision as a betrayal of Israel's interests by Peres and his Labor colleagues at the behest of the United States.

"This was a surrender to foreigners," said Ariel Sharon, a Likud hawk and senior Cabinet member. "The government was revealed at its weakest point in petty political intrigues. The Lavi was shot down, a Lavi which was the supreme creation of Israeli technology."

Lavi opponents, Sharon added, had "lost their faith, . . . they lost their honor, they lost their dignity and they lost their national pride."

The Lavi so far has cost $1.5 billion, almost all of it supplied by the United States, and Reagan administration opposition to the project was a crucial factor in its defeat. The Pentagon and State Department issued identical statements welcoming the Cabinet decision. "We recognize this was a difficult decision for Israel, but it is one we believe will best serve Israeli interests," the statement said.

Opposition from the United States, which provides $1.8 billion a year in military aid, was one reason why Peres decided last week to vote against the project. Secretary of State George P. Shultz and other American officials informed Peres they would be prepared to help finance cheaper alternatives, including the purchase of U.S. F16 jet fighters, which could be partly assembled in Israel, as well as to provide funds to help cushion the blow to the country's defense establishment.

The Lavi had been an issue that cut across party lines until Peres' decision last week to oppose the project. Peres and Shamir had sought for months to avoid a political showdown over the project, but Peres portrayed his decision as an attempt to skip over the Lavi to "the next generation" of warplanes to be built in cooperation with the United States.

In addition to his decision to oppose the Lavi, Peres introduced a proposal that would allocate $100 million from this year's defense budget to Israel Aircraft Industries (IAI), the primary producer of the Lavi, to develop other aviation and weapons systems.

The crucial vote against the project came from one of Shamir's senior Likud ministers, Finance Minister Moshe Nissim, who defied calls for party unity because he said the Lavi, which was expected to go at least $2 billion over original cost estimates, was too expensive. He had strong support from Israel's military general staff, which feared that cost overruns on the Lavi would eat up funds needed for other weapons projects.

Nissim, who has played a pivotal role in holding down government spending and sticking to Israel's austere economic recovery program, told Israel Radio: "This is a sad day. We took a painful decision. I wish we need not have arrived at this decision. But, knowing the situation as I do, and out of my responsibility as finance minister, I want to say that this was the decision that had to be made."

Another of Shamir's closest political allies, former defense minister Moshe Arens, said after the session that he would resign his Cabinet post of minister without portfolio to protest the decision. Arens, an aeronautical engineer, was a major architect of the project.

"I think {the decision} is a major mistake that will hurt not only IAI but our entire industry, our defense effort, the economy, Israeli society as well," Arens, a former ambassador to the United States, told reporters.

"I just know that the Lavi is the best airplane of its kind. We've gone more than two-thirds of the way in developing it. It's a great success, a great technological achievement, and it's going to be a great loss to Israel when that project is canceled."

Ezer Weizman, a Labor minister who supported scrapping the program, said, "You can't, with all due respect to ourselves, receive $1.8 billion a year for defense and say to the uncle, 'You must keep quiet and don't interfere in what we do.' "

Shamir did not endorse the Peres plan to find cheaper alternatives to the Lavi and Likud members last weekend pressured Justice Minister Avraham Sharir, a Shamir supporter, to change his position and support the plane project. In retaliation, the Laborites this morning successfully pressured their own hold-out, Health Minister Shoshana Arbeli-Almoslino, into abstaining on the vote, thus giving them a narrow victory margin.

Moshe Keret, managing director of state-run IAI, said he would begin laying off 4,000 workers on Monday and called the vote "a very, very severe decision." Nearly 2,000 demonstrating workers blocked traffic for an hour on the main road outside the plant grounds today.