A sharp flare-up of violence Wednesday, including one Palestinian militant killed, an Israeli airstrike against Hamas (search) and the shelling of Jewish settlements, jeopardized a fragile truce and threatened to derail efforts to restart Mideast peace talks.

Both Israel and Hamas warned of punishing responses that could degenerate into a resumption of attacks, counterattacks, invasions and bombings.

At nightfall, Palestinian police moved in to try to quell the outbreak in Khan Younis, with Israeli soldiers shooting and killing a 22-year-old Hamas militant on the Gaza-Egypt border. The Israeli military said Palestinians fired rifles and anti-tank grenades at soldiers, who returned the fire.

In apparent retaliation, Palestinians launched more than 20 mortar shells at Jewish settlements across from the refugee camp, slightly wounding an Israeli. For the first time since the truce was declared, Israeli helicopters flew into Palestinian territory and fired a missile, saying the target was "a terrorist cell about to launch further mortars." Two Palestinians were wounded, one critically.

Israel contacted Palestinian officials and demanded that they halt the barrages, said David Baker, an official in Sharon's office. If they do not, he warned, "Israel will take all steps necessary to stop it, whatever that may entail."

Hamas spokesman Mushir al-Masri called the airstrike the latest in a "series of Israeli escalations. ... The calm declared is a conditional one, and we have the right to respond to any violation."

At nightfall, Palestinian police moved in to the refugee camp to try to stop the rocket and mortar fire, and witnesses saw clashes between police and armed militants. No casualties were reported.

The truce has survived a homicide bombing in Tel Aviv (search) in February and a barrage of more than 90 rockets and mortars on Jewish settlements in Gaza on a single day in April after Israeli troops killed three Palestinian teenagers.

The truce is seen as a key part of a chain of events that international mediators hope will lead to resumption of Israeli-Palestinian peace talks, frozen during more than four years of bloodshed.

After the death on Nov. 11 of Yasser Arafat, blamed by Israel and the U.S. for encouraging violent Palestinian resistance and attacks on Israelis, Abbas won a Jan. 9 election to succeed him. Abbas has called violence a mistake and has moved to reform his security services.

The Palestinians have had three rounds of local elections and are scheduled to vote for parliament this summer. Simultaneously, Israel is moving ahead with its plan to pull Jewish settlers out of Gaza and part of the West Bank, starting in August.

All this could lead to a calmer atmosphere conducive to peace talks, with the internationally-backed "road map" plan leading to creation of a Palestinian state, accepted in principle by both sides, already on the table.

But a resumption of violence would scuttle any possibility of negotiations.

Israel says it wants to avoid clashes with the Palestinians during its summer pullout from Gaza. At the same time, Israel has pledged harsh retaliation if Jewish settlers or troops are attacked during the operation.

Israel said it had no choice but to hit back. "What do you expect us to do if they are attacking us?" said Raanan Gissin, a Sharon spokesman.

The government has been pressuring Gaza settlers to accept a plan to move them as a group to a coastal area in southern Israel. Justice Minister Tzipi Livni gave settlers seven days Wednesday to accept the offer. She said 426 of the 1,600 families in Gaza settlements have signed up for relocation.

"Someone who joins at the last minute will not get the same things that we can give those who join today," Livni told reporters.

Avner Shimoni, a Gaza settler leader, condemned the ultimatum.

"What are they giving us, what are they offering us?" he told Israel Radio. "We'll just stay in Gush Katif," the largest settlement bloc.

Also Wednesday, the Palestinian legislature approved a new electoral law, but Abbas is expected to veto the legislation, raising fresh doubts about whether a parliament election set for July 17 will be held on time.

Abbas and his Fatah movement, which controls parliament, are wrangling over the method by which the new legislature will be chosen. Abbas wants all lawmakers to be chosen from party slates. However, under the new electoral law passed Wednesday, two-thirds of the legislators would be elected from districts.

Hamas is posing a serious challenge, tapping into voter disaffection with a decade of Fatah rule characterized by corruption and inefficiency.