“Two assailants entered the synagogue Tuesday with knives, axes and guns and attacked worshippers,” Haaretz quoted Israel Police spokeswoman Luba Samri as saying.
Samri said the attackers were Palestinians from East Jerusalem.
“The attackers were killed in a shootout with police,” she confirmed.
Initially, police suspected that there might be a third assailant on the loose in the area, but later stated that it was no longer a concern.
Ambulances of the Magen David Adom emergency services administered first aid to the injured before evacuating them to various hospitals in the city.
A large number of police personnel have been stationed at the scene of the attack and were also deployed in the East Jerusalem neighbourhoods of Silwan and Jabal Mukaber.
“We heard the sirens and I went outside and saw police taking cover and shooting. Many shots were fired and I saw one of the police personnel getting wounded and the terrorists being killed,” said Eliyahu Rotenberg, who resides near the synagogue.
Israeli Prime Minister Benjamin Netanyahu has called a security cabinet meeting this afternoon.
He said that incitement by the militant group Hamas and Palestinian President Mahmoud Abbas led to the attacks on the Jews.
“This is a direct result of the incitement by Hamas and Abu Mazen (Abbas), incitement that the international community irresponsibly ignores,” Netanyahu said.
“We will respond with a firm hand to this brutal murder of Jews who went to pray and were scathed by (the) despicable murder,” he added.
Hamas praised the attack, describing it as “a quality development in the confrontation with Israeli occupation”.
“The organisation welcomes the terror attack, an appropriate and functional response to the crimes of the occupation,” the Gaza-based group added.
A Hamas spokesperson said the attack was in response to the death of a Palestinian bus driver Sunday night, Channel 2 news reported.
US Secretary of State John Kerry said the attack was an act of “pure terror”.
“This simply has no place in human behaviour,” he said during a visit to London. He also called for Palestinian leaders to condemn the attack.
The violence comes amid high tension in Jerusalem, with a wave of attacks by Palestinians on Israelis killing at least six people in recent weeks.
The tensions largely stem from the expansion of Jewish settlements in East Jerusalem, territories which were annexed by Israel in the 1967 Mideast War, but were home to more than 300,000 Palestinians.