Two senior Hamas members were convicted Thursday by the Jerusalem District Court of activity in a terror organization and of having stayed in Israel illegally.

Khaled Abu Arafeh, who served as the Palestinian Authority’s Jerusalem affairs minister, and PA parliament member Mohammed Totah both signed a plea bargain.

In return, the two weren’t charged with having ties to Hamas’s military wing, Israel Radio reported.

Arafeh and Totah were arrested in 2012 after illegally entering Israel and attempting to avoid arrest.