(Adds police saying there only one gunman)By Alastair MacdonaldJERUSALEM, March 6 (Reuters) - 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 20's."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)
A building at Mercaz HaRav
On Thursday night, a Palestinian gunman entered the library at the Mercaz HaRav, an orthodox religious seminary, in Jerusalem, Israel. He opened fire with an automatic weapon, killing eight people and wounding another ten.

This is the most lethal attack on Israeli civilians in two years and the first attack in Jerusalem in more than three years.

"A terrorist infiltrated the Mercaz HaRav seminary and opened fire. He was killed in an exchange of fire and apparently had an explosives belt," said police spokesperson Shmuel Ben Ruby.

Police chief Aharon Franco said the attack was carried out by a lone gunman who "hid the weapon in a cardboard box." He said the gunman was subsequently killed by an Israeli army officer who, living nearby, ran to the school after hearing gunfire.

Seminary student Yitzhak Dadon, however, claims that he shot the gunman. "He came out of the library spraying automatic fire. ... The terrorist came to the entrance and I shot him twice in the head," Dadon told reporters.

"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.

Hamas sent a text message to reporters, stating, "We bless the (Jerusalem) operation. It will not be the last," but it did not claim responsibility. Sami Abu Zuhri, a senior spokesperson for Hamas, said the group "blesses the heroic operation in Jerusalem, which was a natural reaction to the Zionist massacre," referring to the recent Israeli offensive in the Gaza Strip which killed at least 58 Palestinian civilians.

"It's very sad tonight in Jerusalem. Many people were killed in the heart of Jerusalem," said Jerusalem mayor Uri Lupolianski.

A spokesperson for the Foreign Affairs Minister of Israel said, "terrorists are trying to destroy the chances of peace but we will certainly continue peace talks."

President of the Palestinian National Authority Mahmoud Abbas, who recently froze peace talks with Israel, condemned the attack in Jerusalem.