Israeli PM Benjamin Netanyahu has vowed to win a "battle for Jerusalem" after a deadly attack on a synagogue.
Two Palestinians killed four rabbis in West Jerusalem before being shot dead. A policeman later died of his wounds.
Mr Netanyahu vowed to "settle the score with every terrorist" saying that those "who want to uproot us from our state and capital... will not succeed".
Jerusalem has seen weeks of unrest, partly fuelled by tension over a disputed holy site.
Tuesday's attack was the deadliest in Jerusalem for six years. There were about 25 worshippers in the synagogue at the time and at least seven people were also seriously wounded.
Mr Netanyahu ordered the homes of the attackers to be destroyed, saying: "We are in a battle over Jerusalem, our eternal capital."
He said that this was a "terrible attack at a time of prayer" and condemned what he termed the "shouts of joy" from the Palestinian-controlled Gaza Strip after the attacks.
He said he was strengthening security on the streets of Jerusalem, without giving details.
Mr Netanyahu called on the people of Israel to "stand together as one" but said that "no-one must take the law into their own hands, even if spirits are riled and blood is boiling".
Analysis: BBC Middle East editor Jeremy Bowen
The two sides are further apart than ever. Their conflict used to be, at root, about the possession of land. But since Israel captured the West Bank, including East Jerusalem, in 1967 it has become more defined by religion.
Perhaps that was why the Palestinians chose a synagogue for the attack that killed the four Jewish worshippers and a policeman.
Many Palestinians believe Israel is preparing to allow Jews to pray in the compound of the al-Aqsa mosque in Jerusalem, the third holiest site for Muslims after Mecca and Medina.
The Israeli government has denied that emphatically. But Palestinians listen to calls from hard right-wing Jewish nationalists and believe it might happen.
He added: "I call on all leaders of countries in the Western world: I want to see outrage over this massacre."
US President Barack Obama has condemned the attack, saying: "There is and can be no justification for such attacks against innocent civilians."
Palestinian President Mahmoud Abbas also issued a condemnation of "the attack on Jewish worshippers in their place of prayer and [of] the killing of civilians no matter who is doing it".
Mr Netanyahu said this was not enough.
He accused Mr Abbas and militant group Hamas of spreading "blood libel" that a bus driver who reportedly took his own life in East Jerusalem on Monday had been "murdered by Jews".
Hamas had said the Jerusalem attack was in revenge for the death of the driver, who was found hanged inside a vehicle. His family did not accept the post-mortem findings of suicide.
Mustafa Barghouti, a member of the Palestinian Legislative Council, said he held Mr Netanyahu responsible "for every bloodshed that has happened, whether for Palestinians or Israelis".
He said: "I want to remind you and remind everybody that since the beginning of this year, the Israeli army and Israeli settlers have killed 2,260 Palestinians in Gaza and the West Bank."
The vast majority of those deaths occurred in the summer conflict between Israel and militants in Gaza, which also left 73 dead on the Israeli side.
The attack happened at the Bnei Torah Kehilat Yaakov synagogue and religious seminary site on Harav Shimon Agassi Street - home to a largely Orthodox Jewish community in the Har Nof neighbourhood.
The attackers were armed with a pistol and meat cleavers.
The rabbis who died were Moshe Twersky, 59, head of the seminary; Arieh Kupinsky, 43; and Kalman Levine, 55, all of whom also held US passports. The fourth victim, Avraham Goldberg, 68, was also a UK citizen.
The funerals of the four were held in Jerusalem on Tuesday, with thousands in attendance.
It was later confirmed that Zidan Seif, a 30-year-old traffic officer who arrived at the scene and came under attack, had died of his wounds in Hadassah hospital.
The Abu Ali Mustafa Brigades, the military wing of the Popular Front for the Liberation of Palestine, said it had carried out the attack.
Palestinians identified the attackers as cousins Uday and Ghassan Abu Jamal, from East Jerusalem.
After the attack, there were reports of clashes in the Jabal Mukaber district of East Jerusalem, as Israeli security forces moved in to make arrests that included some members of the attackers' families.
Tensions in the city have risen in recent weeks, with two deadly attacks by Palestinian militants on pedestrians in the city and announcements by Israel of plans to build more settler homes in East Jerusalem.
The Jerusalem compound that has been the focus of much of the unrest - known to Jews as the Temple Mount and to Muslims as al-Haram al-Sharif - is the holiest site in Judaism, while the al-Aqsa Mosque within the compound is the third holiest site in Islam.
Orthodox Jewish campaigners in Israel are challenging the longstanding ban on Jews praying at the compound.
Palestinians want East Jerusalem, occupied by Israel since 1967, as the capital of a future state.
Popular Front for the Liberation of Palestine (PFLP)
- Palestinian militant group founded in 1967, committed to the destruction of Israel
- Carried out high-profile attacks in 1960s and 1970s, including airline hijacking; assassinated Israeli Tourism Minister Rehavam Zeevi in 2001
- Lost influence with its rejection of the 1993 Oslo peace accord, and the rise of Islamist groups like Hamas
- Leader Ahmed Saadat was imprisoned by the Palestinian Authority in 2002, but was seized by Israeli troops in 2006 and taken to Israel
- Has continued to attack Israeli forces on the frontier with Gaza and to launch rockets into southern Israel