A Palestinian UN worker accused by Israel of aiding the Hamas terrorist group was sentenced to seven months’ jail on Wednesday, his lawyer said, in a plea deal that will see him released soon.

Waheed Borsh was convicted of “rendering services to an illegal organization without intention,” his lawyer Lea Tsemel told AFP. With time already served, he is expected to be released on January 12.

The case centered on accusations that rubble in Gaza under the responsibility of the United Nations Development Program (UNDP) was misused by the terrorist group Hamas that controls the enclave.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The engineer from Jabaliya in northern Gaza, who worked for the UNDP, was arrested on July 16.

According to the Shin Bet security service, Borsh was recruited by a Hamas member to “redirect his work for UNDP to serve Hamas’s military interests.”

During his interrogation, Borsh told investigators that in 2014, he was directed by Hamas to “focus on his work in the UNDP in a way that would allow Hamas to extract the greatest possible benefit from him,” the Shin Bet said at the time.

The UNDP has operated in the West Bank and Gaza since the late 1970s. In recent years, its Gaza branch has focused on rebuilding the homes and businesses destroyed in the conflicts between Israel and Hamas.

In August, Borsh was charged with diverting 300 tons of rubble from a UNDP project in the Gaza Strip, run by Hamas, to build a jetty for the Islamist movement’s naval force.

After reviewing the charge sheet, the UNDP challenged Israel’s allegations and said Borsh diverted the rubble under instructions from the Palestinian Authority.

Tsemel stressed that her client had been convicted only of unintentionally aiding Hamas by “moving some rubble.”

“The prosecution claimed that he should have checked better as this could have helped Hamas.”

The UNDP said it had “zero tolerance for wrongdoing”, but that the case did not prove deliberate intent.

“This outcome confirms that there was no wrongdoing by UNDP,” the body said in a statement.

UN officials argued that Borsh, as a UN employee, may qualify for immunity from prosecution and requested that they be allowed to visit him in jail.

Israel however, rejected the UN request, saying “whoever assists a terror organization cannot hide behind a claim of immunity.”

In addition to Borsh, Israel has accused two other Palestinians of infiltrating international aid organizations on behalf of Hamas.

In August, an Israeli court charged Muhammad Halabi with channeling millions of dollars in foreign aid to Hamas and its armed wing, the Izz ad-Din al-Qassam Brigades. Halabi, who worked for the Christian organization World Vision, was arrested in June and later indicted on a number of charges, including funding terror. The charge sheet said he was recruited by Hamas to infiltrate the aid organization more than a decade ago, rising to become the head of the organization’s Gaza operations.

According to the Shin Bet, Halabi also recruited a Palestinian aid worker from the Britain-based Save the Children to join the Izz ad-Din al-Qassam Brigades, in 2014.

The governments of Britain, Germany and Australia suspended their donations to the charity over Halabi’s alleged links to Hamas.

Danny Danon, Israel’s ambassador to the UN, said at the time the cases were evidence of a “troubling trend of the systematic exploitation by Hamas.”

AFP visited the site of the alleged UNDP misuse last summer and found a new-looking jetty extending around 50 metres (yards) into the sea.

Perhaps 10 feet (three yards) wide, it had wooden slats erected on one side to obscure the view.

Armed Hamas fighters were in nearby fields.

UNDP officials privately accepted that rubble from one of its projects may have been used in the construction of the jetty.

But they stressed the disposal occurred in conjunction with the Ministry of Public Works, which is run by Hamas’s rivals Fatah.

Fatah leads the internationally recognized Palestinian government, and a UNDP probe concluded that there were no signs of Hamas activity in the area at the time the rubble was placed there.