Fifth Person Dies In Israeli Synagogue Attack FBI to lead U.S. Investigation into the attack.

 -- An Israeli police officer has died of his wounds from an attack at a Jerusalem synagogue by two knife-wielding Palestinian men earlier today, bringing the death toll in the assault to five.

The attackers also killed four rabbis, three of them American.

The officer was critically wounded when two Palestinian men armed with knives, axes and a pistol burst into the synagogue during morning prayers. He later died of his wounds.

The two alleged attackers were identified as cousins, Ghassan and Oday Abu Jamal, from East Jerusalem, according to a police spokeswoman. Police said they shot and killed them at the scene.

Israeli Prime Minister Benjamin Netanyahu said he would “reply harshly” after police said Palestinian assailants wielding knives and axes killed five people after attacking a Jerusalem synagogue.

After the attack, Netanyahu ordered the demolition of the alleged attackers’ homes and arrested multiple members of each man’s family. He told reporters he would also demolish the homes of other Palestinians accused of recent attacks against Israeli citizens.

“We will respond with a heavy hand to the brutal murder of Jews who came to pray and were met by reprehensible murderers,” said Netanyahu.

This the first attack of this kind on an Israeli synagogue.

Netanyahu earlier had denounced the attack as a "cruel murder of Jews who came to pray and were killed by despicable murderers."

During a news conference Netanyahu blamed Hamas, the Islamic Movement and the Palestinian Authority for helping to incite violence against Jews and warned Israelis to be alert for other potential attacks.

"As a state, we will settle accounts with all of the terrorists and those who dispatched them," Netanyahu said. "Let nobody take the law into his hands, even if tempers flare and blood boils. We are in a lengthy war against abhorrent terrorism which did not start today."

While emphasizing that the United States also condemned the synagogue attack, State Department spokesman Jeff Rathke added that "punitive home demolitions are counterproductive to the cause of peace, especially in an already tense situation."

Three American citizens were among the victims in the attack -- Rabbi Moshe Twersky, 59, formerly of Boston, Rabbi Kalman Levine, 55, and Rabbi Aryeh Kupinsky, 43, Israeli officials said. The fourth dead victim, Rabbi Avraham Shmuel Goldberg, was a British national.

The U.S. Federal Bureau of Investigation said it will lead the U.S. side of the investigation and was "working in close collaboration and cooperation with the appropriate Israeli allies and partners."

“This is a tragedy for both nations -- Israel, as well as the United States -- and our hearts go out to the families, who obviously are undergoing enormous grief right now," President Obama said, denouncing the attack as "horrific" before a meeting with his national security team.

In a joint statement, officials from the Catholic Church of Boston, the Greek Orthodox Metropolis of Boston and the Massachusetts Council of Churches condemned the attack that took one Rabbi Twersky's life. "The senseless killing of people in any place must always be denounced, but that these brutal attacks in the synagogue in Jerusalem should have occurred against innocent, unarmed worshippers deserves only the strongest possible condemnation.

"Our prayers go out to those who were wounded and are fighting for their lives and to all those devastated by this attack, especially the families of those who were murdered today. In a particular way, we are conscious of the death of one of our neighbors from Boston, a member of a distinguished Jewish family, Rabbi Moshe Twersky."

The attack happened in Har Nof, an Orthodox Jewish neighborhood with a population of 20,000 residents, at around 7 a.m. on Tuesday, local time during morning prayers.

Thirty worshipers were taking part in the morning services when the two alleged assailants broke in wielding knives before using a gun to shoot at worshipers, according to the Israeli government. Many of those taken to the hospital had suffered blows to the head with an ax. Pictures of the scene showed the floor of the synagogue covered in blood, according to an Israeli Foreign Ministry official.

At least seven people were injured in the attack, Israel Police foreign press spokesman Micky Rosenfeld said. The area near the synagogue was closed off, and the injured were transported to Jerusalem hospitals.

Hours after the attack, funerals for the four victims drew thousands of mourners, Rosenfeld tweeted.

The accused cousins were reportedly part of the militant group the Popular Front for the Liberation of Palestine, but the organization did not say if it ordered them to carry out the attacks.

Hamas, the militant Palestinian group that runs the Gaza Strip, praised the attack saying it was “quality development in confrontation with Israeli occupation."

Palestinian President Mahmoud Abbas' office said in a statement that he "condemns the killing of the worshippers" in the Jerusalem synagogue, but that Israel should stop "the invasion" of a key Jerusalem holy site and halt "incitement" by Israeli ministers.

Israel and the Palestinians have blamed each other for a recent escalation of violence, and Obama called on leaders from both sides to diffuse tensions.

“At this sensitive moment in Jerusalem, it is all the more important for Israeli and Palestinian leaders and ordinary citizens to work cooperatively together to lower tensions, reject violence, and seek a path forward towards peace,” he said in a statement.

Secretary of State John Kerry voiced anger over the attack.

"The people who had come to worship God in the sanctuary of a synagogue were hatcheted and hacked, were murdered, in that holy place in an act of pure terror and senseless brutality murder," Kerry said. "I call on the Palestinian leadership at every single level to condemn this in the most powerful terms."

The attack put U.S. law enforcement on guard, with New York Police Commissioner William Bratton announcing extra protection would be sent to synagogues throughout New York.

"The NYPD is following developments in Jerusalem closely and working with the FBI Joint Terrorism Task Force to monitor any further developments," said Bratton in a statement. "As of now, there is no specific credible threat to New York City. The NYPD has increased its attention to Synagogues and other symbolic locations around the city."

The Associated Press contributed to this report.

Get real-time updates as this story unfolds. To start, just "star" this story in ABC News' phone app. Download ABC News for iPhone here or ABC News for Android here.