Hamas (search) militants killed an Israeli soldier and wounded four with an explosion in a booby-trapped chicken coop Tuesday, in what the Islamic group said was a scheme to lure troops to the area with the help of a double agent.

The deadly blast went off east of Gaza City (search) and triggered a gunbattle between soldiers and Palestinian militants. Four militants were killed and seven Palestinians, including two teenagers, were wounded, Palestinian officials and militants said.

The military said one soldier was killed and four were wounded by the blast.

The fighting came after relative calm in Gaza following the Nov. 11 death of Palestinian leader Yasser Arafat (search).

Interim Palestinian leader Mahmoud Abbas (search) has tried to persuade militants to suspend attacks on Israelis ahead of Palestinian presidential elections Jan. 9. The main militant groups, Hamas and Islamic Jihad (search), have not given a specific promise, but indicated they would not disrupt Abbas' efforts.

Hamas claimed responsibility for Tuesday's ambush.

Mushir al-Masri, a Hamas spokesman, said the attack was a "natural response to the continuous Israeli crimes against our people and against our fighters." It said two members involved in the ambush were killed.

At a brief and hastily called news conference, three masked militants holding machine guns and hand grenades described an elaborate scheme to lure soldiers to the area with the help of a double agent.

Hamas said it dug a tunnel near the chicken coop in the past four months and packed it with explosives. Meanwhile, a Hamas member pretended to be an informant for Israel. The army frequently relies on Palestinian collaborators to gather intelligence.

Early Tuesday, the informant told the army that a wanted fugitive would be in the area. When troops arrived, Hamas militants detonated the explosives, the group said.

Hamas said it had recordings of its agent talking to his Israeli handler but did not release them. The army declined to comment on the claims, but confirmed that a tunnel had been found near the blast site.

The army said forces were searching for hidden weapons when the explosives went off early Tuesday, triggering a firefight that lasted several hours. Sporadic gunfire was still heard late in the afternoon on the outskirts of the Shajaiyeh neighborhood of Gaza City.

During the fighting, Israeli aircraft fired two missiles on separate groups of armed men. Islamic Jihad said two gunmen were killed in the airstrikes.

Palestinian hospital officials said seven other people, including boys ages 14 and 16, were wounded. A large group of youths had gathered to watch the standoff, occasionally throwing stones at Israeli tanks and bulldozers in the area.

The fighting was the first serious violence in Gaza in the run-up to next month's election.

The race has been shaken up by the sudden entrance last week by jailed Palestinian uprising leader Marwan Barghouti (search), who declared his candidacy just before a filing deadline. Barghouti had previously said he would not run.

Abbas, who had been seen as the clear front-runner, appears to face a serious challenge by Barghouti, according to opinion polls released Monday.

Two polls showed the men in a virtual deadlock, while a third gave Abbas a commanding lead.

The United States and Israel were adjusting to the idea of dealing with Abbas, considered a moderate who opposes violence, when Barghouti's candidacy upset the assumptions.

Barghouti is serving five life terms in an Israeli prison after convictions in fatal Palestinian attacks on Israelis. Israel has said he would not be freed, but a Barghouti victory would create heavy pressure to release him.

Barghouti, 45, the West Bank leader of Arafat's and Abbas' Fatah Party, was captured in the West Bank city of Ramallah in 2002 and is the highest Palestinian official in Israeli custody. Because Abbas, 69, was already the official Fatah candidate, Barghouti was forced to run as an independent.

Barghouti's candidacy raised stiff opposition from mainstream Fatah officials and some younger leaders, charging that the fiery, charismatic candidate would split the party and cause internal conflict.

Barghouti associates have said he might withdraw in exchange for promises by Abbas to give a greater say to young Fatah activists.