Representational Image: Israeli security personnel search a religious Jewish Yeshiva next to a synagogue, where a suspected Palestinian attack took place, in JerusalemReuters

Two suspected Palestinian terrorists struck a synagogue in Jerusalem early on Tuesday, killing at least five people before being shot dead by the security forces.

Nine other worshippers have been injured, including five who are critically wounded. The attack took place at the Kehilat Yaakov synagogue located in a religious study hall in the Har Nof neighbourhood in west Jerusalem.

Two Palestinians, reportedly armed with guns and knives, unleashed an attack on worshippers, shouting 'Allahu Akbar', The Times of Israel reported, citing witnesses. Two police officers then shot down the militants in an exchange of fire.

"We are viewing this as a terrorist attack," police spokesman Micky Rosenfeld was quoted saying by The Jerusalem Post.

The incident has added to rising tensions as several attacks have been reported in Israel in the last few weeks.