An Israeli military appeals court on Monday overturned the indictment of accused Palestinian terrorist Jamal Tirawi on the basis that, in bringing him to justice, the state had broken an agreement to refrain from arresting him.

The hearing was held at Ofer Prison near Ramallah, where many Palestinian security prisoners are incarcerated.

Tirawi, a former Fatah lawmaker, was arrested in 2007 for planning attacks against Israel, including a 2002 suicide bombing at a coffee shop on Allenby Street in Tel Aviv that killed one person and injured 29.

The attack in Tel Aviv took place before Israel agreed to refrain from arresting him.

Tirawi was accused of being a commander in the al-Aqsa Martyr’s Brigade, Fatah’s military wing. His trial lasted more than four years, and in 2011 he was sentenced to 30 years’ imprisonment.

In annulling that decision, the appeals court on Monday criticized the authorities for failing to honor the agreement, and ruled that notwithstanding strong evidence of Tirawi’s involvement in attacks against Israel, the government had to keep its word.

The court also said that the responsible authorities knew of Tirawi’s involvement in the Tel Aviv attack when they signed the agreement to refrain from arresting him.

Tirawi’s lawyer, Avigdor Feldman, called the ruling “brave” and “unprecedented.”