The prime minister says a synagogue was set on fire as an "act of hate" by arsonists who used a broom to spread accelerant.