Israel is to release a Palestinian U.N. employee, seven months after he was arrested for allegedly assisting Gaza's Hamas rulers.

Israel arrested Waheed Borsh in July, accusing him of using his position as an engineer for UNDP, the U.N. development agency, to help the militant Hamas group.

According to court documents obtained on Thursday, Israel reached a plea deal with Borsh in which he was sentenced to time served after confessing. Borsh's lawyer argued he had no criminal intent to assist Hamas. He is expected to be released next week.

A statement by UNDP says the outcome confirms "there was no wrongdoing" by the agency.

Borsh's arrest came days after Israel charged the Gaza manager of the international charity World Vision for allegedly funneling millions to the group.