Israel's parliament approved early today the treaty to end a 30-year state of war between Egypt and Israel by an almost 5-to-1 margin in a major triumph for Prime Minister Menachem Begin.

The Knesset, despite a shrill warning from the extreme right of Begin's party, approved the Middle East peace treaty 95 to 18, with two abstentions. Three members did not vote.

Completing its vote at 4:20 a.m. Israel time (9:20 p.m. EST), the Knesset authorized Begin to sign the accord with Egyptian President Anwar Sadat and President Carter in Washington on Monday. The signing will mark the first peace between Israel and any of its Arab neighbors.

Within nine months -- and possibly sooner -- the frontier between the two countries is to be open for the first time since Israel was established.

Also, the treaty automatically will start a process of negotiating autonomy for 1.1 million Palestinian Arabs in the Israeli-occupied West Bank of the Jordan River and the Gaza Strip.

The vote climaxed 16 months of tortuous, on-and-off negotiations that began with Sadat's historice visit to Jerusalem in November 1977 and ended with Carter's bold six-day shuttle between Cairo and the Israeli capital.

["The Israeli Knesset spoke with a voice heard around the world today -- a voice for peace," President Carter stain in a statement issued a few minutes after the vote was announced.]

"This is the night. This is the hour. The decision is fateful," Begin told the bleary-eyed Knesset members as they prepared to vote by a show of hands.

His words, however, connoted more suspense than there actually was in the crowded Knesset chamber, since the crowded Knesset chamber, since the outcome was evident even before the 28 hours of grueling debate began. Today's speeches lasted for 18 uniterrupted hours.

"What do I feel in my heart?" Begin asked rhetorically. "True joy, yes... an anxiety of what is to come.

"But we know in our hearts that we have reached a turning point. We reached the Egyptian people, and we shall reach the other nations around her," Begin said.

Then Begin, his voice reflecting the emotion of the moment, concluded, "There is nothing more simple and human. We want peace, Shalom."

The vote was even more lopsided than expected, surpassing by 11 the number of favorable ballots the Knesset gave the original Camp David agreements Sept. 28.

As expected, most of the opposition came from the hawkish members of Begin's own Likud bloc and from the five-seat Communist Party.

Throughout the peace negotiations, the most strident opposition came from Begin's long-term Likud colleagues. They warned against Israel giving up the Sinai Peninsula, which it captured in the 1967 Six-Day War, in exchange for a fragile peace. Opposition also focused on the autonomy scheme, which critics said inevitably would lead to establishment of a Palestinian state along Israel's eastern border.

In his summation, Begin alluded to problems with the autonomy plan, saying, "It will be a difficult year, full of hardships. But I want to announce that we want, with all our heart, to implement this proposal."

The certainty of the outcome of the vote seemed to grow as the marathon debate continued into the late hours last night.

As if drawn by the presence of television cameras broadcasting the debate live to a nationwide audience, most of the 120 members of the Knesset walked to the podium and addressed the half-empty chamber. They sounded a recurring and occasionally monotonous theme -- as fraught as it is with the risk of failure, the prospect of peace is an offer that Israel cannot refuse.

Except for an occasional outburst of heckling and arguing from the floor, the debate was low-key and dominated by negative assessments from members who were known to be ready to vote for the peace agreement.

A controversy erupted when several members, citing news reports of discrepancies between the English version of the treaty handed to the members and the version held by the U.S. State Department, demanded a recess until the dispute was clarified.

While most of the discrepancies appeared to be minor and apparently resulted from bureaucratic error, there remained some confusion about a key word in the sections on autonomy for the West Bank and Gaza Strip Palestinians.

The treaty text released by Israel says autonomy will apply to "inhabitants" of the West Bank and Gaza Strip while, some members claimed, the U.S. State Department version refers to "territories" rather than "inhabitants."

The issue is significant because the pivotal National Religious Party, before deciding to support the treaty, received assurances from Begin that autonomy will not apply to the territories but to their individual residents.

As a result of that principle, the autonomy authority would not have jurisdiction over Jewish civilian settlers in the West Bank and Gaza Strip, nor would it be able to dictate the movement of the Israeli soldiers left behind.

The parliament was briefly shaken from its lethargy as right-wing Laam Party member Moshe Shamir and Labor Party member Shlomo Hillel, both critics of the treaty, challenged the right of the Knesset to continue the debate, in light of the discrepancy.

"Why is it all the opponents of peace want a postponement?" shouted Knesset member Uri Avineri, to which Illel replied, "It is you who is an opponent to peace. You collaborate with the PLO [Palestine Liberation Organization]."

Begin put an end to the bickering by saying there were "slight differences" between the two texts, but nothing serious. He explained that the Knesset had been given the most recent draft available yesterday because the final text did not arrive from the U.S. military attache until last night, and that new copies would be distributed as soon as they could be duplicated.

As for the dispute over the word "inhabitants," Begin said that appeared in all the Camp David documents and would remain in the treaty.

Meanwhile some of the members who did speak out against the treaty did so vociferously, and a few of them threatened to quit their parties rather than vote for it.

At least six members of Begin's Likud bloc -- and perhaps more -- are expected to leave the bloc as a result of the treaty vote.