Jerusalem - The library of the rabbinical seminary was crowded for a night-time study session when the Palestinian gunman opened fire. Students scrambled to flee the attack, jumping out of windows. Holy books drenched in blood littered the floor.
The attacker killed eight students and wounded nine before he was shot dead on Thursday night. It was the first major attack in Jerusalem in four years.
Afterward, the Jewish seminarians gathered outside the library and screamed for revenge, shouting, "Death to Arabs," while in Hamas-controlled Gaza thousands of jubilant Palestinians took to the streets to celebrate.
Funeral processions for the dead students - one of them 26-years-old and the rest teenagers between ages 15 and 19 - were to depart from the seminary on Friday morning.
Abbas condemns attacks
Mahmoud Abbas, the moderate Palestinian president with whom Israel is negotiating a peace agreement, condemned the attack. But by Friday morning there were some Israeli lawmakers calling on the government to break off talks.
"The government must immediately halt all negotiations and eradicate terrorism in every way possible," said David Rotem of the hardline Yisrael Beiteinu party. "Later, when we have someone to talk with, we can hold negotiations," he told Israel Radio.
Others rejected that call. "It's the job of a responsible leadership, a logical leadership, to say in moments like these, looking at the blood, at the cries for revenge ... that we, at least we in Israel, will do everything we can in order not to be dragged into this cycle," dovish lawmaker Yossi Beilin told Israel Radio.
Hamas militants, who have been battling Israel during a weeklong surge in violence in Gaza, praised the attack in a statement but stopped just short of claiming responsibility. "We bless the operation. It will not be the last," Hamas said in a statement sent to reporters by text message.
Israeli defence officials said the attacker came from east Jerusalem, where the city's Palestinians live. They have Israeli ID cards that give them freedom of movement in Israel, unlike Palestinians in the West Bank and Gaza.
Police spokesperson Micky Rosenfeld said the attacker walked through the seminary's main gate and entered the library, where witnesses said about 80 students were gathered. He carried an assault rifle and pistol, and used both weapons in the attack. Rosenfeld said at least six empty bullet clips were found on the floor. Rescue workers said nine people were wounded, three seriously.
Massacre instead of Purim
David Simchon, head of the seminary, said the students were preparing a celebration for the new month on the Jewish calendar, which includes the holiday of Purim. "We were planning to have a Purim party here tonight and instead we had a massacre," he told Channel 2 TV.
The gunman was finally killed by a seminary graduate who is an army officer and lives nearby, Simchon said on Friday.
Witnesses described a terrifying scene during the shooting, with students jumping out windows to escape.
The seminary is the Mercaz Harav yeshiva, a prestigious centre of Jewish studies identified with the leadership of the Jewish settlement movement in the West Bank. It serves about 400 high school students and young Israeli soldiers, and many of them carry arms.
Thursday's shooting was the deadliest incident in Israel since a suicide bomber killed 11 people in Tel Aviv on April 17, 2006.