JERUSALEM, JUNE 8 -- Acting Prime Minister Yitzhak Shamir announced today that he had succeeded in forming a new coalition of nationalist and religious parties, signaling the end of three months of Israeli government paralysis and the return to narrow right-wing rule after six years of "unity" governments.

After 42 days of bargaining, Shamir informed President Chaim Herzog hours before the expiration of his mandate to form a government that he had assembled an alliance commanding a two-vote majority in the 120-member Knesset, or parliament. The new government is expected to seek a vote of confidence from the Knesset on Monday.

The announcement indicated that one of Israel's most bitter and protracted political crises would end with a victory for leaders who oppose a U.S. plan for Israeli-Palestinian negotiations. The refusal of Shamir to agree to the talks prompted the breakdown of the last coalition government March 15.

Shamir's new government can be expected to return to some of the controversial policies that marked the Likud administrations under Menachem Begin and Shamir up until 1984, analysts here said. Among these are Jewish settlement of the occupied West Bank and Gaza Strip, which the new official platform promised to "enhance, expand and develop" despite strong opposition from the Bush administration.

In a ceremony to sign the new coalition agreement today, Shamir said "the greatest effort" of the new government would be directed at the mass immigration of Soviet Jews to Israel, which he called "the most important issue of our time." The platform said Israel would continue to pursue the Middle East peace process according to a four-point plan put forward by Shamir last year but made no mention of the proposed Israeli-Palestinian talks, which the United States and Egypt had attempted to set up in Cairo.

The new cabinet, which Shamir is expected to present to a Likud Party meeting on Sunday, reflects the ascendancy within the Likud of hard-line leaders who had campaigned to block the proposed Israeli-Palestinian negotiations. Ariel Sharon, the hard-liner who as defense minister led Israel into the 1982 invasion of Lebanon, failed in a bid to regain his old post but was given the job of housing minister, with special authority to supervise Israel's absorption of Soviet immigrants.

The new foreign minister is expected to be David Levy, one of the three Likud ministers who fought the peace initiative. Another of the three, Yitzhak Modai, has been promoted to the post of finance minister. Moshe Arens, until now the foreign minister and Shamir's closest ally in the Likud, will become defense minister.

The new agreement spelled at least a temporary end to the era of "unity" governments, which combined Likud with the left-of-center Labor Party and brought both stability and stagnation to Israeli politics in the last half of the 1980s.

Several moderate Likud leaders said they were uneasy with both the political orientation and fragility of the new coalition. Incoming health minister Ehud Olmert, who helped lead Likud's final round of bargaining with its new partners, said tonight that the new administration might be a short-lived "way station" to new elections.

Asked if the government could be sustained, Shamir, who has now formed three successive cabinets as prime minister since 1986, said, "It won't be easy, but I'll try with all my might to see that it lasts the scheduled time to the next elections," in 1992.

The new Likud coalition includes two small nationalist parties, three religious parties, and at least five splinter factions, four of which consist of only one person each. In all, the alliance covers 60 seats. Another nationalist party, Moledet, has agreed to vote its two seats for the coalition in the Knesset but will not join the government.

Shamir and his aides encountered extraordinary difficulties in reconciling the competing demands of the religious politicians and splinter factions for government posts, and one of the three parties, Torah Flag, still refused to sign the coalition agreement today. That loose end, together with signs of disgruntlement from several other maverick deputies, raised the possibility that Shamir's government could still collapse before it is approved by the Knesset on Monday.

Just such a disaster befell Shimon Peres, the leader of the Labor Party, who spent five weeks trying to set up a narrow left-wing government after the crisis began in March. Peres originally pushed for the downfall of the unity government because he believed he had won over key religious party politicians to the idea of a "peace government" led by Labor. On the day he was due to present a coalition to parliament, two deputies defected, leaving him a vote short.

The long months of bargaining and maneuvering by Labor and Likud, which saw a succession of small parties and individual Knesset members seize the national spotlight with narrow demands, threats, or defections from one bloc to another, prompted a national outcry and renewed calls for reform of Israel's electoral system.

One of the small right-wing parties in the new coalition, Tzomet, succeeded in extracting a commitment from Likud to allow parliament members to vote their consciences on pending reform legislation that would, among other steps, mandate the direct popular election of future prime ministers. The concession meant that the reform could have some chance of passage in the coming months, analysts here said.

Shamir came under strong pressure from right-wing politicians to accelerate settlement in the territories, crack down on the ongoing Arab uprising, and renounce both his own peace initiative and the 1978 Camp David accords, which laid out peace terms between Israel and Egypt as well as the framework for an Israeli-Palestinian settlement.

However, the new coalition platform specifically endorses the Camp David framework and calls for a continuation of Shamir's initiative. That plan calls for elections in the occupied territories of Palestinian representatives to negotiate self-rule with Israel as well as the opening of peace talks between Israel and Arab states and the rehabilitation of Palestinian refugee camps.

It was in an attempt to implement the elections proposal that U.S. Secretary of State James A. Baker III formulated the plan for preliminary Israeli-Palestinian talks. Although Likud spokesmen publicly insist that neither the Baker proposal nor the elections option is dead, they say the new government likely will attempt to call attention to other parts of the original plan, such as the proposal that bilateral peace talks be opened between Israel and Arab governments.

Taking a decidedly hard-line stance on some of the most debated issues in the peace process in the last year, the government's new guidelines stipulate that Israel will not accept "direct or indirect" negotiations with the PLO and will not allow Palestinians living in East Jerusalem to participate in any eventual elections or talks with Israel about self-rule.

The platform says settlements "in all the land of Israel," including the West Bank and Gaza "are the right" of the Jewish people "and an inseparable part of our national security." In contrast to past coalition agreements, the statement does not spell out how many new settlements will be built or how much money will be appropriated for them.