Hamas militants in the Gaza Strip praised the operation in a statement, and thousands of Palestinians took to the streets of Gaza to celebrate.
The attack struck at the heart of Israel's hard-line religious West Bank settler's movement, reports CBS News correspondent Mark Phillips.
The day's violence, which also included a deadly ambush of an army patrol near Israel's border with Gaza, was likely to complicate attempts by Egypt to arrange a truce between Israel and Palestinian militants. The U.S. is backing the Egyptian effort.
Israeli government spokesman Mark Regev harshly condemned the shooting and said the Palestinian government must take steps against the extremists - not just denounce their attacks.
"Tonight's massacre in Jerusalem is a defining moment," he told The Associated Press. "It is clear that those people celebrating this bloodshed have shown themselves to be not only the enemies of Israel but of all of humanity."
Secretary of State Condoleezza Rice, who only on Wednesday persuaded moderate Palestinian President Mahmoud Abbas to return to peace talks with Israel, condemned the attack as an "act of terror and depravity."
Israeli defense officials said the attacker came from east Jerusalem, the predominantly Palestinian section of the city. Jerusalem's Palestinians have Israeli ID cards that give them freedom of movement inside Israel, unlike Palestinians in the West Bank and Gaza.
Police spokesman Micky Rosenfeld said the attacker walked through the seminary's main gate and entered the library, where witnesses said some 80 people were gathered. He carried an assault rifle and pistol, and used both weapons in the attack. Rosenfeld said police were also searching for an explosives belt.
Two hours after the shooting, police found the body of the eighth victim. Rescue workers said nine people were wounded, three seriously.
David Simchon, head of the seminary, said the students had been 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 and instead we had a massacre," he told Channel 2 TV.
Yehuda Meshi Zahav, head of the Zaka rescue service, entered the library after the attack. "The whole building looked like a slaughterhouse. The floor was covered in blood. The students were in class at the time of the attack," he said. "The floors are littered with holy books covered in blood."
Witnesses described a terrifying scene during the shooting, with students jumping out windows to escape.
One of the students, Yitzhak Dadon, said he shot the attacker twice in the head. "I laid on the roof of the study hall, cocked my gun and waited for him. He came out of the library spraying automatic fire," he said.
Police said an Israeli soldier in the area then shot the man dead. After the shooting, hundreds of seminary students demonstrated outside the building, screaming for revenge and chanting, "Death to Arabs."
The seminary is the Mercaz Harav yeshiva in the Kiryat Moshe quarter at the entrance to Jerusalem, a prestigious center of Jewish studies identified with the leadership of the Jewish settlement movement in the West Bank.
It was founded by the late Rabbi Tzvi Yehuda Hacohen Kook, the movement's spiritual founder, and serves high school students and young Israeli soldiers, and many of them carry arms.
"It's very sad tonight in Jerusalem," Mayor Uri Lupolianski told Channel 2 TV. "Many people were killed in the heart of Jerusalem."
The Mercaz Harav yeshiva has around 500 students including many foreigners, reports CBS News correspondent Dan Raviv. Some young American Jewish men study there.
In Lebanon, Hezbollah's Al-Manar satellite TV station said a previously unknown group called the Martyrs of Imad Mughniyeh and Gaza was responsible for the attack. The claim could not immediately be verified. Mughniyeh, a Hezbollah commander, was killed in a car bomb in Syria last month. Hezbollah has blamed Israel for the assassination.
Hamas stopped just short of claiming responsibility for the Jerusalem shootings. "We bless the operation. It will not be the last," Hamas said in a statement sent to reporters by text message.
At mosques in Gaza City and the northern Gaza Strip, many residents performed prayers of thanksgiving - only performed in cases of great victory to thank God.
About 7,000 Gazans marched in the streets of Jebaliya, firing in the air in celebration, and visited homes of those killed and wounded in the last Israeli incursion. In the southern town of Rafah, residents distributed sweets to moving cars, and militants fired mortars in celebration.
Rice said she spoke with Israeli Foreign Minister Tzipi Livni to express U.S. condolences to the people of Israel and the families of the victims of the attack in Jerusalem.
"This barbarous act has no place among civilized peoples and shocks the conscience of all peace loving nations. There is no cause that could ever justify this action," she said.
At his West Bank headquarters, Abbas condemned the attack. "The president condemned all attacks that target civilians, whether they are Palestinian or Israeli," a statement said.
Abbas had briefly suspended talks to protest an Israeli offensive in Gaza that killed more than 120 Palestinians.
The attack came on the same day Egyptian officials were trying to mediate a truce between Palestinian militants and Israel. The proposal, backed by the U.S., would stop rocket fire on Israel in exchange for an end to Israeli attacks on militants and the resumption of trade and travel from Gaza.
An Israeli official confirmed that Israel is open to the idea of letting guards from Abbas' moderate Fatah movement oversee Gaza's borders - one of the main tenets of the truce idea. But the Israeli spoke before the shooting, and it was not immediately known whether his country's position would change.
The Egyptian proposal reflected a growing realization that Israel's current policy of blockade and military action has failed to weaken Hamas, which has proven its ability to disrupt a U.S.-sponsored drive to forge an Israeli-Palestinian peace deal by the end of the year.
Still, a deal between Hamas and Israel was far from certain, with Israel fearing the militants will use any lull to rearm and Hamas raising tough conditions, such as a demand for Israel to stop targeting militants in the West Bank as well as Gaza.
Other militant groups are also likely to disrupt any attempts to restore calm. Early Thursday, Palestinian militants set off a bomb on the Gaza border, blowing up an Israeli army jeep and killing a soldier. Late Thursday, Israel said it shot a group of militants trying to plant a bomb in the same area. Palestinian officials said four militants were wounded in an Israeli ground attack.
This was the first major attack by Palestinian militants on the Jewish side of Jerusalem in the last four years, although police and the military claimed to have foiled many attempts.
Between 2001 and 2004, at the height of Palestinian-Israeli fighting, Jerusalem was a frequent target of Palestinian attacks, including suicide bombings on buses.