The four were likely killed in a work accident, by either an explosive device or a rocket blowing up in their three-wheeled vehicle.
Local residents at the hospital morgue identified the four dead men as members of the Palestinian Islamic Jihad group. Islamic Jihad did not immediately confirm the men were members.
Initially, the Palestinians tried to pin the incident on the IDF, saying the Israeli army attacked a Hamas position with tank fire.
The IDF denied the claim. "We have no knowledge of any Israeli strike in the area," an IDF spokesperson said.
The incident comes a day after some 10,000 Gazans gathered at the border with Israel to stage another protest as part of their "March of Return" for a third consecutive week.
The IDF said that a number of protesters attempted to damage and cross security blocks set up ahead of the demonstrations, while others attempted to carry out terror attacks by hurling explosive devices and Molotov cocktails.
One such explosive device planted in the vicinity of the Karni crossing ended up injuring several demonstrators by mistake after detonating prematurely.
The protests included a new method aimed at harming Israel beyond the fence in the form of kites being set alight and flown over the fence onto Israeli territory. A video demonstrating this method was published on Wednesday in a bid to encourage the residents to fly the burning kites into Israel. The video shows a kite landing in Israeli territory and causing a fire to the vegetation fields surrounding a military base, before spreading and promting the arrival of Israeli firefighters.
The soldiers responded with live rounds towards main perpetrators and riot dispersal measures.
A 28-year-old Palestinian man was killed, while about 30 protesters were wounded by IDF gunfire, the IDF confirmed. Gaza health officials say 528 Palestinians were hurt, including 122 by Israeli army fire.
The Associated Press and Reuters contributed to this report.