Seven Palestinians including a senior militant figure have been killed in clashes with Israeli troops in the Gaza Strip, Palestinian officials said.
The officials said the men were shot at a mourning ceremony during an Israeli undercover raid.
But Israel said its troops were engaged in a gunfight with armed men threatening Israel with rocket fire.
Palestinian sources said the incident was in Beit Hanoun but Israel said it was operating near Beit Lahiya.
The incident came as Palestinians celebrated Eid al-Fitr, the holiday marking the end of the Muslim fasting month of Ramadan.
A statement from Palestinian Authority President Mahmoud Abbas condemned the killings as a "massacre".
Local people in Beit Hanoun said the men were paying their respects to a militant who was shot recently by the Israelis.
At least 14 people were also wounded in the shooting, Palestinian sources said.
Some witnesses said the militants thought they were being attacked by a rival Palestinian group.
Among those who died in the burst of fire was a man named Ata Shinbari, a senior commander in a militant organisation called the Popular Resistance Committees, the group and witnesses said.
The group is heavily involved in launching crudely made rockets across Gaza's border into Israeli territory.
The militant groups often say that such missile fire is a response to Israeli army actions in occupied Palestinian territory.
Mr Shinbari has been described as the man in charge of his organisation's activity in northern Gaza.
A spokesman for the group, Abu Abir, vowed revenge for Shinbari's death, saying at a news conference: "This is the calm before the storm."
Violence between Israelis and Palestinians in recent weeks has been at its worst since June, when the Israelis launched an offensive to try to rescue a captured soldier.
The Popular Resistance Committees was one of the groups that claimed joint responsibility for the abduction of Cpl Gilad Shalit.