A strong anti-government trend that could mean an unprecedented upset victory for Israel's rightist opposition party was predicted here shortly after the voting ended today in Israel's parliamentary election.

The computer trend - based on television interviews with voters rather than actual returns - showed the opposition Likud Party leading with 36.6 per cent of the vote. The ruling Labor alignment was trailing with 26.6 per cent. Early voter returns, although still inconclusive, appeared to confirm the trend.

The National Religious Party, a right-wing potential ally of Likud in a future coalition, also showed surprising strength in the television projections, with 9.2 per cent of the vote. The liberal reform party, the Democratic Movement for Change, with 13.3 per cent of the projected vote, was also showing unexpected strength.

Labor's leader, Defense Minister Shimon Peres, in a television interview, to be on the verge of conceding, He called the results "painful and surprising," and said "there is no doubt that we were dealt a severe blow. But our party is a great party with deep roots and I'm convinced that we will rise again faster than most people believe."

The Democratic Movement may hold the key to power as neither Likud nor its right-of-center allies appear to have enough strength to rule on their own.

If the dramatic television prediction is confirmed in the actual vote count, it will mean the first real change of government in Israel's history. The Labor alignment, in one coalition or another, has ruled since the birth of Israel in 1948.

A Likud-led government, even in coalition with other parties, could have a major impact on the American-led effort to bring about Middle East peace negotiations this year, since Likud is firmly opposed to returning any of the occupied West Bank to the Arabs. Labor has generally stated more willingness to make concessions on the occupied territories.

Not even Likud and the National Religious Party together, however, are expected to win enough votes to form a right-of-center government alone. Additional coalition partners will be needed and the possibility of Likud trying to form an across-the-board government of national unity cannot be excluded.

A new coalition of government could take many weeks to form. There is also a possibility that new elections may have to be called.

The television prediction indicates that the 2.25 million voters' main concern was to get the ruling Labor alignment out of power. Public opinion polls showed that inflation, now running around 40 per cent, corruption and labor strikes were the main issues.

A climate of economic stagnation coupled with inflation, added to repeated charges of corruption and scandal among the Labor Party's leaders, appear to have had a cumulative effect on the morale of Israel's voters. Evidently it was enough to overcome the strong pull of tradition that has put labor back in power again and again in eight previous general elections.

A Likud victory probably would cause difficulties in forming a coalition because the key Democratic movement for change opposes annexation of West Bank territory. The movement differs from the Labor Party in opposing interim agreements. The movement would give back West Bank terirtory only for a final peace agreement.

Although public opinion polls in the closing weeks of the campaign had shown a surge of strength for the opposition Likud at Labor's expense, none predicted anything like the strength the Likud showed in the television predictions. The predictions were made on the basis of booths set up in selected spots around the country. It was the first time polling of voters for television had been tried in Israel.

Voting was heavy in fine, fair weather. It was a national holiday and the roads were jammed with people who, having voted early, were headed to the beaches and parks.

In the Meah Shearim Quarter of Jerusalem, religious Jews in their 18th century black costumes went to the polls in cars and taxis provided by the various political parties. Some, rejecting even the state of Israel's Zionism as an affront to God's will, refrained from voting altogether.

In the East Talpiot settlement on the outskirts of the capital, new immigrants, many of them from the Soviet Union and voting for the first time in a free election, lined up to cast their ballots. Many of them had difficulty because they could not yet read Hebrew.

In Abu Gosh, an Israeli Arab village near Jerusalem, the population voted in a local school.Communist slogans on a nearby wall attested to the expected strength of the Communist Party among Israel's Arab voters.

The final official results will be announced only in two or three days when the votes from army posts around the country are counted.