For the second time in two months, Libya on Thursday blocked the U.N. Security Council from condemning violence and unrest in the Middle East.

The move came after a gunman entered the library of a rabbinical seminary in Jerusalem and opened fire on a crowded nighttime study session, killing eight people and wounding nine before he was slain. Israeli defense officials said the attacker came from east Jerusalem, the predominantly Palestinian section of the city.

Zalmay Khalilzad, U.S. ambassador to the United Nations, said the obstruction undermines the council's effectiveness in the region.

"What happened today was clearly a terrorist act," he told reporters after the council's almost two-hour emergency session. "We regret that this makes it difficult for the council to contribute positively to developments in this region, but those who blocked this possibility bear responsibility for that."

The United States had proposed a press statement, which carries less weight than a formal resolution, condemning a day of violence that included not only the seminary attack but also a deadly ambush of an army patrol near Israel's border with Gaza. Palestinian militants set off a bomb, blowing up an Israeli army jeep and killing a soldier.

In closed-door discussion among the 15-nation council's diplomats, Libya insisted the statement should be "balanced" by including condemnation of Israeli actions in Gaza, a Libyan U.N. representative said after the meeting.

Three other nations agreed with Libya, but most council members wanted to keep the issues separate, said council diplomats involved in the negotiations.

Russia's U.N. ambassador Vitaly Churkin, the council's president this month, suggested a compromise by including an expression of deep regret at the loss of civilian life in the conflicts so far, and said he regretted Libya would not go along.

In January, Libya blocked the council from expressing concern about the safety of people living along the chaotic Gaza-Egypt border. The council had negotiated for most of the week on how to word a statement originally proposed by Arab nations and initially opposed by the U.S.

Last Sunday, at the request of the Palestinians and their Arab supporters, the council emerged from a five-hour emergency session to issue a press statement condemning the escalation of fighting in southern Israel and Gaza and urging Israelis and Palestinians "to immediately cease all acts of violence."