JERUSALEM (AP) _ Prime Minister Yitzhak Shamir fired Vice Premier Shimon Peres today in a dispute over peace talks and all the Cabinet members of Peres' Labor Party quit, collapsing the 15-month-old coalition government.

Peres' dismissal and the resignations do not take effect for 48 hours, leaving room for a last-ditch compromise. ''Things could happen, the situation can change,'' Shamir said on Israel radio.

But reconciliation seemed remote as Labor leaders ruled out further contacts with Shamir's right-wing Likud bloc. ''The compromises... are behind us, not before us,'' Peres said.

The collapse of the coalition sent party leaders searching for alliances to form a new government before a planned no-confidence vote in Parlaiment Thursday. Both Likud and the center-left Labor Party are seeking alliances with small religious parties, who hold a swing vote.

If the no-confidence motion fails, Shamir could remain prime minister by forming an alliance with the smaller parties. If it passes, Shamir remains head of a caretaker government until a new government is formed by either Labor or Likud.

The dispute is over Labor's support of a U.S. proposal to hold peace talks in Cairo with a Palestinian delegation. The delegates would discuss plans for elections in the occupied territories on self-rule for the Palestinians.

Likud objects to involving the 140,000 Arabs in east Jerusalem in the elections.

In a radio interview, Shamir said he acted to preempt Labor's efforts to muster a majority for Thursday's Parliament vote. He said the Jerusalem issue was the main obstacle.

''These differences of opinion are not so small...they exist and firstly about Jerusalem, an issue about which we are very sensitive, especially these days when we hear voices from the United States,'' Shamir said.

The remark was an allusion to recent statements by U.S. leaders, including President Bush, suggesting Jerusalem could be negotiable in peace talks and Bush's criticism earlier this month of building Jewish neighborhoodq in east Jerusalem.

Both Labor and Likud maintain that Jerusalem is not negotiable, but Labor favors a compromise: allowing Jerusalem Palestinians to vote elsewhere in the disputed lands.

President Bush said today his comments two weeks ago about the status of Jerusalem were blown ''way out of proportion'' but he declined to retract them.

''I do not want to look in any way like we're trying to mingle into the internal affairs of Israel,'' Bush said.

Israel radio said today that Shamir also considered submitting his resignation before Thursday, but the premier denied it.

After leaving the Cabinet, Peres raised the possibility of avoiding new elections by forming a Labor-led government with ultra-Orthodox and left-wing parties.

The balance of power is held by two ultra-Orthodox religious parties who have seven of the 120 seats in the Knesset, or parliament. Labor and its allies control 55 seats, while Likud and its partners control 58.

Explaining the prime minister's decision to expel Labor from the coalition, Shamir spokesman Yossi Achimier said his boss ''wants only one thing: to prevent a Paleqtinian state.''

Labor Communications Minister Gad Yacobi said Shamir's decision to end the coalition ruined prospects for a Palestinian-Israeli dialogue: ''The prime minister has closed the door on the peace process...for this he bears heavy national responsibility.''

Palestinians described the collapse as a setback for Israel's plan to hold elections in the occupied territories as a first step in resolving the Palestinian problem.

Bethlehem Mayor Elias Freij said ''I believe Israel has killed its own peace plan ... and this will have very dangerous repercussions throughout the Middle East.''

Freij alluded to predictions that without an active process Arab-Israeli tensions would increase and result in violence, both in the occupied territories and from radical Palestinian groups abroad.

Baruch Askarov, an aide to Peres, said today's Cabinet session began with stormy arguments between the two sides and then Shamir announced the dismissal of the Labor leader. The other Labor ministers then submitted resignations prepared in advance, he said.

Peres' dismissal came after the Labor Party's 1,300-member Central Committee voted Monday night to give the party's leaders the power to pull out of the government if progress was not made in the Middle East Peace process.

Likud argues that accepting the U.S. peace plan would mean implicitly recognizing the Palestine Liberation Organization and bringing hnto question Israeli control over Arab east Jerusalem, which was annexed after its seizure with the occupied lands in the 1967 Middle East war.

More than 660 Palestinians have been killed by Israelis in a 27-month-old uprising against occupation of the West Bank and Gaza Strip. Nearly 200 Palestinians have been killed by fellow Arabs, most on suspicion of collaborating with Israel, and more than 40 Israelis have died.