Israeli Finance Minister Binyamin Netanyahu, Prime Minister Ariel Sharon's chief political rival, abruptly resigned his cabinet post Sunday in a final-hour protest over Israel's planned withdrawal from the Gaza Strip and four Jewish settlements in the West Bank.

Netanyahu's resignation, submitted during the weekly cabinet meeting, will have no practical effect on Sharon's plan to begin evacuating Israeli settlements and military installations in Gaza on Aug. 15. But the timing of the resignation highlighted the bitter political contest between the two men for leadership of the Likud Party in the run-up to general elections that must be held before the end of next year.

Netanyahu submitted his resignation and walked out of the cabinet room moments before the first of several procedural votes formally setting the evacuation plan in motion. By a vote of 17 to 5, the cabinet then authorized the Israeli army to evacuate the first group of Gaza settlers, roughly 1,200 people in the isolated enclaves of Netzarim, Kfar Darom and Morag, where military officials expect some resistance.

"We have reached the moment of truth today," Netanyahu wrote in the letter announcing his resignation, which takes effect in 48 hours. "There is a way to achieve peace and security, but a unilateral withdrawal under fire and with nothing in return is certainly not the way."

Sharon has pushed the Gaza evacuation despite stiff opposition from his Likud Party, which voted overwhelmingly against the plan last year in a nonbinding party referendum. The prime minister has argued that leaving the 21 Gaza settlements, where 8,500 Jewish residents live within fortified fences surrounded by 1.3 million Arabs, will improve Israel's security and the long-term viability of its Jewish majority.

In a news conference, Netanyahu said Sharon was continuing with the evacuation despite evidence that a "terror base" was being established in Gaza by radical Palestinian groups -- such as the Islamic Resistance Movement, or Hamas, and Islamic Jihad -- which oppose Israel's right to exist.

"This is happening against all the warnings," Netanyahu said. "I can do nothing about this from the inside, so I'll leave."

Netanyahu compared the evacuation to the 1993 Oslo accords, which he has criticized for failing to adequately ensure Israel's security while giving the Palestinians autonomy over some parts of the occupied territories. He suggested that the Gaza withdrawal, which Sharon is undertaking without receiving concessions from the Palestinian leadership, is rewarding the attacks against Israel that have occurred since the most recent uprising began in September 2000.

In a statement, Sharon said only that the government intended to push ahead with its current economic plan despite the finance minister's resignation. Hours later, Sharon named Ehud Olmert, a deputy prime minister and Likud member, to replace Netanyahu as finance minister.

Netanyahu, who served as prime minister from 1996 until losing the general elections in 1999, has been perhaps the Likud Party's most vocal critic of withdrawal. But his position has sometimes been inconsistent and has angered many party loyalists, whose support he will need to challenge Sharon successfully for the party leadership after the Gaza evacuation.

Over the past year, Netanyahu has cast several cabinet votes in favor of the withdrawal plan, known as disengagement. At the same time, much to the chagrin of Sharon, he has tried to derail the evacuation in the Knesset, Israel's parliament, by backing calls for delaying the evacuation and supporting a public referendum on its merits.

"Netanyahu is a genius politically," said Gideon Ariel, a conservative member of the Likud Party's central committee. "I hope that the other ministers who say they are against the expulsion will now follow suit. Netanyahu made it very clear that it's impossible to stay" in a government that favors "expelling Jews from their homes."

Israeli political analysts said Netanyahu's departure is part of a broader realignment of Israel's political parties in the coming months, precipitated by Sharon's disengagement plan.

Increasingly, Israel's political alliances appear to be forming along generational lines, with men such as Sharon and the leader of the rival Labor Party, Shimon Peres, clashing with younger leaders such as Netanyahu over Israel's future boundaries and its relationship with the Palestinians. Sharon and Peres, who are old friends, have been involved in public life here since before Israel's creation nearly six decades ago.

In proposing a unilateral withdrawal from Gaza, Sharon tacked away from his traditional supporters among the Likud's hard line. Peres, also a deputy prime minister, alienated some members of his own party by backing Sharon and joining his government, even though the Labor Party favors the disengagement plan.

Many political analysts are predicting a split within Likud following the disengagement, with Netanyahu leading one wing and Sharon another. In what political analysts and party operatives describe as the "big bang," Sharon and Peres would then form a new movement, joined by the leader of the centrist, secular Shinui Party, Yosef Lapid. The result could be a majority coalition in the 120-seat Knesset.

"Netanyahu is preparing for such an eventuality -- no question about it," said Gabriel Sheffer, a political science professor at Hebrew University. "This is connected to major changes in the Israeli party system which will occur after the withdrawal from the Gaza Strip. He is zigzagging, and this is nothing new."

Jewish settlers in Kfar Darom urge an Israeli border policeman to refuse orders to take part in Israel's disengagement from the Gaza Strip.Israeli Prime Minister Ariel Sharon, left, with Finance Minister Binyamin Netanyahu.