An Israeli man was sentenced Thursday to 4.5 years in prison for selling equipment to Hamas operatives that was allegedly used for rocket launches from Gaza and in the group’s network of tunnels.

Trader Riad Mashrawi was convicted at Be’er Sheva District Court of transferring equipment worth hundreds of thousands of shekels to Hamas via the Kerem Shalom border crossing. The equipment was sold to numerous Hamas activists, including some who had been released in the 2011 Gilad Shalit prisoner swap.

Prosecutors claimed Mashrawi had known that the items he sold were being used by Hamas for the firing of rockets and establishing communications in their tunnels system. However, the court was not presented with evidence showing specifically that the products he sold were used for these purposes.

Mashrawi was convicted of contacting a foreign agent, providing service to an unlawful organization, forbidden use of property and other counts.

The charge sheet included a total of 11 counts. Mashrawi has been selling electrical appliances to the Hamas-run University of Technology and Science in Gaza since 2005. These items included projectors, pylons and cables for phones and computers. He was also charged with selling an electric switch worth 36,000 shekels ($9,060).

He was convicted on several counts of selling predominantly electrical products to activists connected with the Health Ministry in the Hamas government, as well as to employees from Hamas Prime Minister Ismail Haniyeh’s office.

During Operation Protective Edge in the summer of 2014, Mashrawi transferred three separate donations of between 1,000 to 2,000 shekels to a Hamas activist who served as an accountant in Haniyeh’s office, asking that the money be distributed to Hamas operatives.

Mashrawi was first arrested in January 2015. He was held until April, when he was released to house arrest in the Bedouin town of Hura, in the Negev.

In the sentencing hearings, prosecutors asked for a six-year sentence. Prosecuting attorney Moran Gez also asked the court to impose a 1-million-shekel fine on Mashrawi. The defendant’s attorney, Moanes Younes, asked for a prison term ranging from six months to two-and-a-half years, pleading for the lower limit due to his client’s medical condition and the fact that he had no prior convictions. Younes also claimed the Shin Bet security service had never warned Mashrawi not to sell the items to Hamas activists.

Judge Yoel Eden sentenced Mashrawi to 4.5 years in jail, minus time served, as well as a 12-month suspended sentence and a fine of 100,000 shekels. The judge said the medical documents presented to him did not convince him that a lighter sentence was in order. Regarding the claim that Mashrawi was not forewarned, the judge declared that this argument didn’t warrant a lighter sentence.

At the end of the hearing, Younes asked for a stay of implementation of the sentence until an appeal could be filed, arguing that the chances of getting an appeal were good. Gez opposed this, but agreed to granting Mashrawi a few days to get his affairs in order. She added that there was a chance Mashrawi might try to flee to Gaza. The judge acceded to Younes’ request, stating that Mashrawi had abided by his house arrest terms.