JERUSALEM, JULY 22 -- Labor Party leader Shimon Peres tonight defeated a bid by longtime rival Yitzhak Rabin to replace him as party chief, ending a bitter confrontation within the Israeli left over how to challenge the new government of Prime Minister Yitzhak Shamir.

Rabin, a former army general who for two years directed Israel's effort to put down the Palestinian uprising in the West Bank and Gaza Strip, is shown by most opinion polls to be the most popular candidate for prime minister, well ahead of Shamir and Peres.

But Labor's left-leaning Central Committee refused to back Rabin, apparently having been persuaded by arguments that the shift would recast the party as a mirror image of Shamir's Likud Party, a right-wing bloc that has won three of the last four general elections.

Peres, 66, also argued that the issue was not so much whether he or Rabin should lead the party, but whether the leadership should be decided now or next year. Delaying a change of leadership would allow younger Labor politicians to move up in time to be considered in general elections set for 1992, Peres contended. Rabin is 68, and Shamir is 74.

In a close but decisive vote, the Labor Party's 1,400-member Central Committee decided to retain Peres as its leader at least until next year when a new competition will be held to choose a candidate for the general elections. The party leadership contest will be moved up only if the election date also is advanced, the party decreed.

The decision represents a crushing defeat for Rabin, a former prime minister and defense minister, who hoped to unseat Peres this month and force Shamir's new right-wing government into early elections. Israeli political observers said the setback might be the final blow to Rabin in his bitter, 15-year rivalry with Peres, and perhaps the end of his long political career.

Peres, in an emotional address to the committee, suggested that both he and Rabin should retire before the next elections and give the floundering party a chance to renew itself.

After his victory, however, which came by a vote of 54 to 46 percent, Peres hedged on that proposal, saying he would retire only if he judged that younger candidates were ready to succeed him. But he added, "I certainly hope that a young leadership will arise that will gradually replace us."

Moshe Shahal, a younger Labor member of parliament, said he was already planning his campaign to win the party's top post. "The practical result" of the committee's decision, he said, "is that the contest for the leadership of the party will be open to a new generation."

Peres and Rabin and their personal rivalry have dominated Labor since the retirement of prime minister Golda Meir in 1974. Together, the two leaders have presided over a major decline in the fortunes of the party, which has suffered from both the shift of Israeli voters toward the right as well as the decline in influence of such traditional party foundations as the kibbutzim, or collective farms, and the Histadrut trade union movement.

After four years of serving as a partner in "unity" coalition cabinets led by Shamir, Peres led Labor out of the government in March and launched a desperate bid to form a new, left-wing coalition. His six-week effort ended in tatters, as his attempts to make deals with Likud defectors outraged many Israelis, and his unwieldy coalition collapsed on the day he was to present it for a vote of confidence.

That defeat and Shamir's subsequent formation last month of his own narrow coalition with right-wing and religious parties prompted Rabin to launch his campaign against Peres. Arguing that he was the only Labor leader who could challenge Shamir successfully and that Peres must answer for his blunders, Rabin quickly won the support of most of Labor's parliamentary delegation.

But Peres, who has shown a genius for staging comebacks throughout his political career, managed to stop Rabin's campaign with a series of procedural maneuvers in party administrative bodies. He then won the support of many Central Committee members who hope both of the campaigners can be retired before the next election.