A Palestinian gunman opened fire in a Jewish religious school in Jerusalem on Thursday, killing at least eight people and wounding about 10 in the most lethal attack in Israel in two years, emergency services said.
"It was a slaughterhouse," said Yehuda Meshi-Zahav, head of the Zaka emergency service after surveying the scene at the Merkaz Harav seminary, one of the most prominent Jewish educational centres in Jerusalem.
Jerusalem police chief Aharon Franco said a lone gunman carried out the attack and was killed by an Israeli army officer who lives nearby and ran to the school after hearing gunfire. Police had said earlier there were two gunmen.
There was no immediate claim of responsibility for the attack, which was greeted with celebrations in the Gaza Strip, where a recent Israeli offensive killed more than 120 Palestinians, about half of whom were identified as civilians.
An Israeli Foreign Ministry spokesman said "terrorists are trying to destroy the chances of peace but we will certainly continue peace talks" with Palestinian President Mahmoud Abbas. The Palestinian leader condemned the Jerusalem attack.
Witnesses said the gunman entered the crowded seminary and fired an automatic weapon at students in its library. Franco said the attacker killed eight people, and emergency services said about 10 were wounded.
Police said it appeared most of the dead were in their 20s.
"He hid the weapon in a cardboard box," Franco said.
It was the highest Israeli death toll since April 17, 2006, when 11 people were killed and over 60 wounded in a suicide bombing during the Passover holiday in Tel Aviv.
Yitzhak Dadon, who told reporters that he shot the gunman, said the attacker, wearing torn jeans, fired at the students with a Kalashnikov assault rifle.
"I saw the gunman and he fired a long burst in the air. But then he disappeared. I saw him again when he approached the door of the library. I shot him twice in the head. He started to sway and then someone else with a rifle fired at him, and he died," Dadon said.
Some 50 ambulances raced to the area and police held back worried parents searching for children who had been attending a study session marking the start of Adar, the most festive month of the Jewish calendar.
Outside the school, a crowd shouted "Death to the Arabs".
In the Hamas-controlled Gaza Strip, gunmen fired in the air to celebrate the attack, three days after Israel ended a ground offensive it said was aimed at curbing cross-border rocket fire.
Sami Abu Zuhri, a Hamas official, said the group "blesses the heroic operation in Jerusalem, which was a natural reaction to the Zionist massacre".
A loudspeaker in Gaza City blared the message: "This is God's vengeance."
(Additional reporting by Ari Rabinovitch; writing by Jeffrey Heller; editing by Tim Pearce)