Two Palestinian women were killed and another 10 were reported wounded when Israeli forces today opened fire on a group preparing to act as a human shield for militants in a Gaza mosque.

Dozens of women were gathering outside the mosque in Beit Hanoun in the northern Gaza Strip this morning after an appeal on a local radio station. More than 30 gunmen had taken refuge in the building after the Israeli army began its largest Gaza offensive in months in an attempt to stop militants launching rocket attacks on nearby Jewish settlements over the border.

Television pictures showed at least 50 women making their way along a pavement when shots could be heard ringing out. They started to flee in terror and at least two women were left lying on the ground.

Witnesses said two women, both aged about 40, were killed, and 10 others were wounded. The Israeli army said troops spotted two militants hiding in the crowd of women and opened fire.

A large group of women protesters went on to gather outside the mosque. In the resulting confusion all the militants managed to escape, some reportedly wearing robes supplied by the women.

A 22-year-old Palestinian man was also killed in the northern town, which troops seized on Wednesday. At least 23 Palestinians, most of them militants, have been killed and 155 wounded since the offensive began, according to local health officials.

Israeli tanks and armoured personnel carriers surrounded the mosque when militants took refuge there. Overnight, the two sides exchanged fire. Troops also threw stun and smoke grenades into the mosque to pressure the gunmen to surrender. Witnesses said an Israeli army bulldozer knocked down an outer wall of the mosque, causing the ceiling to collapse.

The Israeli army said the gunmen inside the mosque were able to take advantage of the women's demonstration to escape because there weren't enough infantrymen to block the protesters from approaching the building, and troops didn't want to shoot into the crowd.

However, live ammunition was fired in the course of the demonstration, wounding a Palestinian cameraman and a number of women. Hospital officials reported that many of the women were shot in the foot.

The Palestinian prime minister, Ismail Haniyeh, of Hamas "saluted the women of Palestine ... who led the protest to break the siege of Beit Hanoun". He urged the UN secretary general, Kofi Annan, to witness first-hand "the massacres of the Palestinian people", and appealed to the Arab world to "stop the ongoing bloodshed".

A spokesman for Hamas militants said 32 gunmen who had taken cover in the mosque escaped with the help of the women.

Residents said Beit Hanoun, a town of 30,000 people, was effectively under full Israeli control, with a curfew imposed.

Loudspeakers across Gaza called on people to come to demonstrations after Friday prayers to express solidarity with Beit Hanoun. By late morning, two rallies were already in progress in Beit Hanoun, and militants in the crowds were firing at soldiers, the Israeli army said.

The Israeli army said it targeted Beit Hanoun because it was a major site for launching rocket attacks. But Israeli officials have said the takeover of Beit Hanoun was expected to last only a few days and did not signal the start of a wider military offensive in Gaza.

Militants, however, continued to fire rockets at Israeli border communities. Two Israelis were slightly wounded and a house was damaged in the latest attacks.

In a separate operation last night, an Israeli air strike on a car in Gaza City killed three Hamas fighters, including a local militant commander, witnesses said. An Israeli army spokeswoman confirmed the strike.