Robert Piper, the United Nations’ coordinator for humanitarian and development activities, issued a statement on Monday — before the allegations against the agency engineer were made public — calling any misuse of aid “a profound betrayal.”

“Everyone would pay a high price for such acts,” Mr. Piper said. “If proven by a due legal process, these actions deserve unreserved condemnation; Gaza’s demoralized and vulnerable citizens deserve so much better.”

The indictment contends that Mr. Bursh transferred 300 tons of construction rubble to a port that he knew would be used at some point by the Qassam Brigades, Hamas’s military wing.

It says that he was contacted in April or May 2015 by Hosni Suleiman, an activist in the Qassam Brigades who was acting on behalf of a high-ranking Qassam member, Abu Anas al-Andour. It also accuses him of being in contact with two men referred to only by their last names, Rantissi and Radwan, two prominent Hamas-loyal families in Gaza.

The Shin Bet said in a statement that Mr. Bursh had also persuaded his managers to prioritize the rebuilding of homes in an area “populated by Hamas members,” and had notified Hamas activists when United Nations workers removing rubble uncovered openings of attack tunnels or entrances to weapon-storage rooms so they could take control of the sites.

An uncle of Mr. Bursh’s denied the charges. He said the engineer, who is from Jabaliya, a crowded neighborhood north of Gaza City, was a quiet family man whose wife had given birth to their seventh child while he was in detention. “If Waheed came to me and said, ‘I belong to a militant group,’ I would respond to him and say, ‘You are liar,’ ” said the uncle, who would give only his nickname, Abu Abed.

Mahmoud Zahar, a Hamas leader in Gaza, said the group did “not rely on employees of international aid organizations for any needs of the resistance.” He added that if the allegations are true, “then it is an individual act — we are not responsible.”