Israel's Shin Bet security agency says two Palestinian gunmen who carried out a deadly shooting attack at a Tel Aviv cafe last month drew inspiration from the Islamic State group.

The attack left four Israelis dead and others wounded. It was one of the deadliest attacks in a nine-month wave of violence, though there have been other Islamic State-inspired attacks in Israel.

The security agency says the gunmen were not recruited by Islamic State nor received training from IS. Shin Bet says one of the attackers had returned to the West Bank in January following studies in Jordan. It says the gunmen's original plan was to carry out an attack on an Israeli train.

Shin Bet said Monday the revelation came following the arrest of Palestinian accomplices to the attack.