Israel formally declared war on Hamas on Sunday, setting the stage for a major military operation in Gaza as fighting rages on Israeli soil. The declaration comes after Hamas, an Islamist militant group, launched a surprise assault this weekend that has so far killed over 600 Israelis.

Saturday was the deadliest day in decades for Israel and came after months of surging violence between Palestinians and Israelis, with the long-running conflict now heading into uncharted and dangerous new territory. Questions remain over how the Israeli military and intelligence apparatus appeared to be caught off guard in one of the country’s worst security failures.

Over 400 Palestinians have been killed in Gaza as Israel responds with airstrikes in the densely-inhabited enclave. Israeli Prime Minister Benjamin Netanyahu has vowed retaliation, warning his country would take “mighty vengeance” and was readying for “a long and difficult war.”

He urged Palestinians living in Gaza to “leave now.”