The attack during morning prayers in the west Jerusalem neighbourhood of Har Nof was carried out by two Palestinian cousins wielding meat cleavers and a pistol. They were shot dead by police at the synagogue.
Three of the fatally wounded were born in the United States and the fourth was a British-born grandfather. A police man later died of his injuries and at least seven others were wounded.
Mr Netanyahu declared Israel is “in a battle over Jerusalem, our eternal capital” after the bloodshed and vowed to “settle the score with every terrorist and their dispatchers”.
However, he warned that "no-one may take the law into their own hands, even if spirits are riled and blood is boiling".
Unrest in Jerusalem
Unrest in Jerusalem
A masked Palestinian celebrates the attack on the Jerusalem synagogue holding a poster of the attackers,Ghassan and Uday Abu Jamal, during a rally in Rafah in the southern Gaza Strip
A masked Palestinian youth wearing a Hamas headband uses a sling-shot to throw back a tear gas canister towards Israeli forces during clashes outside the Israeli-run Ofer military prison following the deadly attack on a Jerusalem synagogue
Masked Palestinians hold axes and a gun as they celebrate with others an attack on a Jerusalem synagogue, in Rafah in the southern Gaza Strip
Israeli Zaka emergency services volunteers carry the body of one of the two Palestinian assailants who were shot dead while attacking worshippers at a synagogue to an ambulance in the ultra-Orthodox Har Nof neighbourhood in Jerusalem
An Ultra-orthodox jewish man prays at the scene of an attack, by two Palestinians, on a synagogue in the ultra-Orthodox Har Nof neighbourhood in Jerusalem
An Israeli woman cries on a veranda next to a synagogue where a suspected Palestinian attack took place in Jerusalem
An Israeli police officer gestures as he holds a weapon near the scene of an attack at a Jerusalem synagogue
Israeli Zaka emergency services volunteers carry the body of an assailant who was shot dead while attacking a synagogue
Israeli emergency services personnel clean the sidewalk at the scene of an attack, by two Palestinians, on Israeli worshippers at a synagogue in the ultra-Orthodox Har Nof neighbourhood in Jerusalem
Israeli security personnel run next to the synagogue in Har Nof, where a suspected Palestinian attack took place
A Palestinian activist knocks a hole through the wall near East Jerusalem
A masked Palestinian youth burns a tire near Israel's controversial barrier that separates the West Bank town of Abu Dis from Jerusalem
A Palestinian protester throws a stone at Israeli troops during clashes in the West Bank town of Abu Dis near Jerusalem
Palestinian mourners attend the funeral of bus driver Yusuf Hasan al-Ramuni in the West Bank town of Abu Dis from Jerusalem . A Palestinian bus driver was found hanged in his vehicle in Jerusalem, sparking clashes, after what Israel said was an apparent suicide but a colleague said looked like murder
A Palestinian protester tries to hammer a hole through Israel's controversial barrier that separates the West Bank town of Abu Dis from Jerusalem
Palestinian protesters climb a ladder at Israel's controversial barrier that separates the West Bank town of Abu Dis from Jerusalem
Israeli border policeman arrested over shooting of Palestinian boy during West Bank protests
Masked Palestinian youths clash with Israeli security forces in the east Jerusalem neighbourhood of Abu Tor
Israeli fire fighters inspect the scene of an attack in Jerusalem. A Palestinian man rammed his car into a crowded train platform in east Jerusalem and then attacked people with an iron bar, killing one person and injuring 13 in what authorities called a terror attack before he was shot dead by the police. The militant Islamic group Hamas took responsibility for the attack
Israeli police officers walk at the scene of an attack in Jerusalem
Israeli rescue workers and paramedics carry an injured man to an ambulance after a Palestinian man, Ibrahim al-Akri, was shot by Israeli police officers after he drove into a crowd of people
Ultra-Orthodox Jews look on from behind a police line at the scene of a killing when a Palestinian man drove a van into a crowd of police and civilians along the tracks of the Light Rail trolley system in East Jerusalem
The Israeli PM also denounced what he described as “shouts of joy” from the dozens who celebrated in the streets of Gaza after the killing spree.
In an act of retaliation, he also ordered the demolition of the homes of the attackers.
US President Barack Obama branded the attack "horrific" and without justification and urged cooperation from both sides to ease tensions.
But Mr Netanyahu said he wanted to see “outrage” from the leaders of Western countries over the “massacre”. He pledged to increase security on the streets but did not detail exactly what this would involve.
On Wednesday, Jewish worshippers returned to the Jerusalem synagogue and sought comfort in prayer.
The attacks appeared to mark a turning point after weeks of unrest, with the gruesome scene in a house of worship shocking a nation long accustomed to violence.
Two weeks ago, a Palestinian driver was shot dead by Israeli police after ramming his car into a crowd at a tram stop in East Jerusalem, killing a border policeman and wounding 13 others.
A Palestinian bus driver was found hanging in his vehicle in a Jewish part of Jerusalem late Sunday, which was ruled a suicide by an inquest. This verdict was disputed by his family members and others, who claim he was murdered for being Arab.
Shortly after Tuesday's attack, the Israeli government released a photo of a bloody meat cleaver it said came from the crime scene. Government video showed blood-soaked prayer books and prayer shawls on the floor of the synagogue.
"I saw people lying on the floor, blood everywhere," one worshipper at the synagogue told Israel Radio.
"People were trying to fight with (the attackers) but they didn't have much of a chance.”
Police identified the synagogue assailants as Ghassan and Oday Abu Jamal, cousins from the Jabal Mukaber neighbourhood in East Jerusalem. The Popular Front for the Liberation of Palestine (PFLP), a militant group, said the cousins were its members.
Palestinian President Mahmoud Abbas denounced the bloodshed in a statement, saying: "The presidency condemns the attack on Jewish worshippers in their place of prayer and condemns the killing of civilians no matter who is doing it.
But Mr Netanyahu said the Palestinian leader's condemnation of the attack was insufficient and accused Abbas of inciting the recent violence.
The synagogue attack was the worst in the city since 2008, when a Palestinian gunman killed eight people in a religious school.
Additional reporting by agenciesReuse content