A Gazan man was handed a death sentence in the Hamas-run Gaza  Monday on charges of spying for Israel, a court source said.

“The military court in Gaza decided upon death by hanging for the convict, 54, on charges on spying for Israel,” the source said.

The court said the man had allegedly been linked to Israelis since 1987 and had provided a large amount of information to the Shin Bet since then.

The case was held behind closed doors and the defendant was referred to only by the initials E.A.

Another alleged spy was sentenced to 10 years in prison.

The authorities in Gaza executed three men behind closed doors in May, the first time the death penalty had been carried out since 2014, drawing condemnation from the United Nations and rights groups.

During the 2014 war, 18 alleged collaborators with Israel were shot dead in public by Hamas forces.