JERUSALEM (CNN) -- The U.N. Security Council failed to reach a consensus when it met to consider condemning an attack that killed eight people at a prominent Jewish seminary as an act of terrorism.

Ambulance workers put one of the casualties from the seminary attack into an ambulance. more photos »

The council said Libya -- a new, nonpermanent member -- blocked the statement on Thursday night. Ibrahim Dabbashi, Libya's deputy ambassador to the United Nations, said the attack on the school was no different than Israeli military offensives against militants in Gaza.

But Dan Gillerman, Israel's ambassador to the United Nations, said he saw no connection between Thursday's shooting and Israel's operations in Gaza.

"This is not a story of retaliation," he said. "These people have been terrorizing Israel for years, have been carrying out suicide bombings and indiscriminate attacks for years."

A gunman broke into the Jewish seminary about 8:30 p.m., spraying automatic-weapons fire, authorities said. Most of the victims were students in their teens and 20s, medical officials said.

At least nine others were wounded before an off-duty Israel Defense Forces officer fatally shot the gunman, Jerusalem District Police commander Aharon Franko said.

The gunman was carrying an AK-47 and a pistol -- and had time to swap weapons during the massacre.

Police are trying to identify the gunman and figure out how he managed, while drawing little notice, to enter the large three-story school in a bustling residential neighborhood.

"There was no alert or warning about this attack," Franko said. Watch the immediate aftermath of the attack »

A first responder said the bodies were on the floor of the study hall surrounded by holy books.

No group has claimed responsibility for the attack.

Video from Thursday's scene showed a frantic crowd of rescue workers carrying bloodied victims into ambulances. Dozens of police officers were scouring the campus and streets around the yeshiva in case there were other gunmen.

Outside the school, scores of Israeli men gathered from surrounding neighborhoods, demanding justice for the attack.

Authorities are calling the incident at west Jerusalem's Merkaz Harav yeshiva an act of terrorism. The school is one of the largest seminaries in Israel, with about 500 students in the yeshiva and 200 in an advanced graduate program.

"Israel is at the forefront of the struggle against terrorism and will continue to defend its citizens, who are exposed to this threat on a daily basis," Israel's Foreign Ministry said in a written statement.

"Israel expects the nations of the world to support it in its war against those who murder students, women and children, by any means and with respect for neither place nor target."

President Bush backed Israeli leaders in a statement issued Thursday, saying, "I condemn in the strongest possible terms the terrorist attack in Jerusalem that targeted innocent students at the Merkaz Harav yeshiva. This barbaric and vicious attack on innocent civilians deserves the condemnation of every nation."

But Libya's Dabbashi compared the attack with "bloodshed in the Palestinian territory."

"For us, the human lives are the same. We judge the incident itself," Dabbashi told reporters after the Security Council meeting. "When we have to condemn the killing of the Israeli civilians, we also have to look at what's happening in Gaza."

Jerusalem security increased

Security was bolstered, with thousands of additional officers across Jerusalem and the rest of Israel, authorities said.

Meanwhile, celebratory shooting took place in Gaza City after the news of the attack, with hundreds chanting and clapping in the streets. But Palestinian Authority President Mahmoud Abbas criticized the killings.

"The Palestinian Authority condemns any attack on innocent civilians," Abbas' office said in a written statement.

The shootings came just a day after U.S. Secretary of State Condoleezza Rice, who met with both Israelis and Palestinians, announced that peace talks will resume between the two sides.

Abbas suspended peace negotiations last week after fierce fighting broke out between Israel and Palestinian militants in Gaza, but he agreed to resume negotiations after meeting with Rice.

Israel will continue peace talks with the Palestinians regardless of the attack in Jerusalem, Foreign Ministry spokesman Aryeh Mekel said Thursday.

Israel conducted a large-scale operation in Gaza to hunt down Palestinian militants who have been firing dozens of rockets into Israel. At least 70 Palestinians and two Israeli soldiers were killed during the operation, Israeli and Palestinian sources said. Militants also fired at least 25 rockets toward Israel, wounding at least two civilians.

"This operation came directly after the attack committed inside Gaza. This operation is a normal response," said Fawzi Barhoom, a Hamas spokesman in Gaza. Watch Barhoom's reaction to the attack »

Gillerman said the Security Council should condemn the attack. "They are so, so quick sometimes to criticize Israel for defending itself. I would like to see those members convene as we speak in order to condemn this in the strongest possible terms."

Thursday's attack was the worst inside Israel since April 17, 2006, when a suicide bombing outside a falafel restaurant in Tel Aviv killed nine people. Islamic Jihad claimed responsibility for that attack.

Attacks in Jerusalem are rare. Eight people were wounded August 10 in the Old City when a Palestinian resident grabbed a security guard's gun and fired; and four Israeli security guards were wounded May 26 when two Palestinian gunmen began firing in east Jerusalem. All three of the assailants were killed. E-mail to a friend

CNN's Ben Wedeman and Atika Shubert contributed to this report.

All About Israel • Palestinian Politics