At her confirmation hearings yesterday, Hillary Clinton insisted President-elect Barack Obama would not give up on Mideast peace - even though the region's problems seem "intractable."

Nothing seems more intractable than the Israeli-Palestinian struggle. At the moment, hundreds of Palestinian civilians are dying in the crossfire in Gaza, as Israeli troops fight Hamas militants in an effort to stop them from rocketing civilians inside Israel.

Cease-fire talks are under way in Egypt. If no halt has been arranged before Obama takes office, Clinton's first foreign-policy task should be to expedite one. For if this battle goes on much longer, it will produce the exact opposite of what Israel and the supportive Bush administration intended - by handing a victory to Hamas and Iran.

Indeed, Hamas - which refuses to recognize Israel's right to exist - is trying to drag Israel into a trap. Its fighters want to lure Israeli soldiers into Gaza's crowded cities and refugee camps, causing more Palestinian civilian deaths and exacerbating an already awful humanitarian crisis. Hamas suicide bombers would then have a chance to kill many more Israeli soldiers.

An Israeli move into the cities and camps would create further uproar in the Arab world. No matter that Hamas operates from civilian areas, violating the rules of war; that would not ameliorate the televised scenes of civilian suffering that would follow an Israeli urban invasion.

Such a move by Israel would undermine moderate rulers in Egypt and Jordan, who dislike Hamas, but whose people are aghast at the scenes from Gaza. Meantime, Iran's ayatollahs would gain popularity on the Arab street for their support of Hamas.

More Gaza carnage would also undercut any chance of reviving the Arab League peace plan promoted by Saudi Arabia's King Abdullah, which calls for recognition of Israel by all Arab states as part of a two-state solution.

The one thing an extended invasion of Gaza would not do is enable Israel to deal a final blow to Hamas. Unless Israel were prepared to reoccupy Gaza, some variant of Hamas would return once Israeli soldiers pulled out of the strip. Nor is it feasible for Israel to forcibly return governance of Gaza to Mahmoud Abbas, the moderate leader of the Palestinian Authority. Abbas would be reviled as an Israeli puppet if his men returned to Gaza behind Israel's tanks.

All this is not to say that Hamas needn't be confronted. Endless rocket fire on Israeli towns has turned even Israeli doves against the peace process, raising fears that any withdrawal from the West Bank would put rockets within shooting distance of Jerusalem and Tel Aviv.

Now that Hamas has been weakened, Obama and Clinton should look at Gaza's history for the best way to vanquish the movement: The key lies in convincing the local population that Hamas militants are killing chances for peace.

In 1996, the late Palestinian leader Yasser Arafat conducted his only serious crackdown on Hamas. Why? Because the Palestinian population demanded the crackdown after Hamas bombed two Israeli buses, risking hopes that the Oslo peace process would lead to a two-state solution. The crackdown came too late; the bombings persuaded Israelis to oust the dovish Prime Minister Shimon Peres and vote in the hawkish Benjamin Netanyahu.

In 2005, Israeli Prime Minister Ariel Sharon withdrew Israeli troops from Gaza unilaterally, rather than coordinating withdrawal with the moderate Abbas and giving Abbas' Fatah party credit.

The unilateral withdrawal permitted Hamas to claim it had driven Israel out by force, and that Abbas' strategy of negotiation was pointless. This, in turn, helped propel Hamas to victory in 2006 elections and to its ultimate takeover of Gaza. The freezing of the peace process, plus continued Israeli settlement-building, further undermined Abbas.

Hamas' popularity in Gaza had been dropping before the Israeli invasion, and new Palestinian elections are scheduled this spring. How can Gazans and West Bankers once more be encouraged to see Hamas as an obstacle to peace?

An invasion of Gaza's cities will force Palestinians back into Hamas' arms. A cease-fire and a new peace push by Obama and Clinton, along with an opening of Gaza's sealed borders, could change the political climate. In tandem (let's hope) with a gutsy new premier after February elections in Israel, these shifts would undercut and isolate Hamas.