Emergency food distribution to 850,000 refugees and medical services will continue, but schooling and waste collection are among the services to be cut after the deaths.
"In view of the increased threats to our staff, UNRWA has no choice but to scale back its operations in Gaza," John Ging, UNRWA's director in Gaza, said in a statement on 13 June.
"With immediate effect, the Commissioner General, Karen AbuZayd, has decided to suspend temporarily UNRWA operations in Gaza except essential medical services and emergency food distributions. She will keep the situation under constant review with a view to restoring full services at the earliest opportunity," Ging said.
On Wednesday afternoon, a refuse collector working for UNRWA was caught in crossfire and died while on duty in Khan Younis, a southern town in the Gaza Strip. Another employee was caught in crossfire at Beach Camp in Gaza City on Tuesday and died later in hospital.
Two other UNRWA employees, a sanitation worker and a refuse truck driver, have been seriously injured by gunfire but are in a stable condition, UNRWA said.
Overall, more than 50 Palestinians have been reported killed during the latest round of violence, which saw scores of heavily armed Hamas fighters attack strategic positions manned by Fatah fighters across the Gaza Strip.
Ging said the increasingly desperate situation in Gaza underlined the need for all parties to show restraint and allow humanitarian organisations such as UNRWA to fulfill their responsibilities towards the Palestinians.
"No choice but to scale back"
"We want to get back and do the job we are supposed to do, so we will keep the situation under constant review, but when our staff are harmed we have no choice but to scale back operations," UNRWA spokesman Chris Gunness told IRIN from Jordan.
UNRWA's cutback came as Gaza's medical services began to collapse, medical NGOs said. Hospitals are reportedly struggling to cope with the numbers of wounded while ambulances were blocked by armed men at informal checkpoints that have sprung up around Gaza.
"The situation is absolutely terrible. The hospitals are overwhelmed with injured people. There is a high number of injured people combined with a low capacity to hold patients. And the drug provision system is not functioning," said William Dufourcq, head of mission for the NGO Médecins du Monde.
"We can't reach our patients because our ambulances can't get out. Our staff are frightened. We really have no idea if things are going to get better," said Abdel Hadi, director of Medical Relief in Gaza, whose services, such as mobile clinics, are used by thousands of Palestinians.
A civilian was killed on Wednesday as about a thousand Palestinians took to the streets in Gaza City to protest against the bloodshed but came under fire.
"People are really angry at the militants. They feel like they are being used and that they are stuck in the middle of factional fighting which is not related to them," said one aid worker in Gaza, who asked not to be named.