On a recent Sunday morning, I paid a visit to a women’s community center in Zeitun, an outlying neighborhood in Gaza City that is run by United Nations Relief and Works Agency. It was packed. Behind one curtain, several middle school girls were getting an English lesson to supplement their formal instruction. In another room, women in their 20s were learning how to write a résumé and cover letter. Behind another door was a group of mothers getting assistance on how to help their children with homework.

And it is in that room that I heard one of the most emotionally affecting stories during my brief trip to Gaza: The group clamored to speak about this center, which, despite its densely packed rooms, offers an attractive and unusual opportunity for the women to gather outside the home. A mother who seemed young herself wouldn’t let me leave until she explained that the center brought her young teenager sufficiently up to speed in the classroom, and that the daughter is no longer thinking of dropping out and getting married but instead wants to continue and to attend university.

I spent a day touring various UNRWA facilities in Gaza and encountered other moving scenes: a ninth-grade human rights class in which an unusually interactive teacher guides students in learning to handle problems assertively but politely and without resorting to force; a vocational training program teaching carpentry to otherwise unemployable young men; an explanation from an earnest UNRWA official about how a problem with declining academic performance and collapse of school discipline had been turned around in a couple of years.

Who could ever object to an organization involved in such activities? In fact, UNRWA has many public critics who otherwise agree on nothing else: Hamas, the Israeli government and members of the United States Congress all periodically show deep annoyance at the six-decade-old international organization. What is even more surprising is that for all their annoyance, each one of these critics finds that UNRWA is indispensable for the current moment. And every political indication is that the current moment will last for a very long time indeed.

What bothers the critics, of course, is not so much the educational activities themselves, but the way in which a makeshift organization has become part of a permanent architecture that none of them controls.

Sometimes UNRWA is simply a convenient political target; in such cases, the actual facts are immaterial. Thus an Israeli television program launched an exposé of UNRWA highlighting a 12th-grade textbook supposedly in use by the agency; the producers had failed to take note that UNRWA schools stop at the ninth grade. And indeed, UNRWA is most frequently targeted on Capitol Hill because of textbooks it has not written. And, more strangely, it is criticized for utterly imaginary or misleading accounts of what those books say. Witness, for example, Newt Gingrich, who made the utterly false claim in one Republican debate that Palestinian textbooks say, “If there are 13 Jews and nine Jews get killed, how many Jews are left?” and that the United States even paid for those books.

Such antics might be at best tangentially related to UNRWA (since it simply uses whatever books are authorized by the local government), but they seem to pop up whenever the organization’s funding is discussed. For UNRWA, the pattern is worrying, since the impact on the organization’s funding could be fatal to programs that provide education for more than 40% of Gaza’s students, as well as health care and some other rudimentary social services for Palestinians spread across several countries. And occasionally there is more than a worry involved: Canada actually cut off funding UNRWA’s general operations as a result of such criticisms. UNRWA’s relations with Israel, Congress and the Hamas-led government in Gaza have all been tense at times. And yet as often as it seems to get caught in the crossfire, UNRWA emerges largely unscathed. Indeed, the closer the various actors look, the more indispensable UNRWA seems.

To explain why, let us start with the Hamas-led government in Gaza. While UNRWA’s critics in Israel often have accused UNRWA of sheltering Hamas, my own impression from following Hamas’s policies and speaking to officials in its Ministry of Education is that Gaza’s leaders regard the organization as a necessary nuisance. In the five years since it took sole control of governing Gaza, Hamas has slowly squeezed out nongovernmental organizations, harassed political opposition and extended control over many aspects of public life. UNRWA is by far the largest and most effective organization in Gaza not under Hamas’s control. It has expressed criticisms about the organization’s summer camps, and annoyance at not being allowed to review and approve the innovative human rights curriculum. Indeed, it is in part because UNRWA schools follow the unified Palestinian curriculum that the Hamas government has not attempted to make unilateral changes to Islamize the content of Gaza’s textbooks. Yet any time Hamas’s actions have crossed UNRWA’s red lines, it is the former that has backed down, realizing that it would be utterly unable to fill the gaping hole in educational and social services if UNRWA shut down.

Israeli officials will often complain about UNRWA’s advocacy on behalf of Palestinian humanitarian needs. But while there is not much love, there is grudging acceptance by the Israelis, as well, that UNRWA provides irreplaceable and critical services and inserts an internationally supervised presence into Palestinian society, even in the Hamas-controlled Gaza. It is hard to imagine that a Palestinian society bereft of UNRWA’s services would serve any Israeli interest.

International donors certainly bear the chief burden of UNRWA, since they supply its budget. When complaints come, however, it is generally not from the broad base of taxpayers (when Canada cut off UNRWA, for instance, it saved no money but just shifted the funds to other Palestinian activities, including UNRWA’s emergency programs). Instead, some political actors will blame UNRWA for sustaining the problem it was constructed to ameliorate: the refugee status of millions of Palestinians. (Perhaps not so oddly, Palestinians will also make a similar complaint — that UNRWA is well designed to manage their refugee status and thus to decrease pressure to resolve it.) But the alternative for now — having Israel or the country of their current residence offer them citizenship — would not only be rejected by all potential hosts; it would also be impossible in the West Bank and Gaza, where there is no state to offer them anything. And it would run clearly against Palestinian-Israeli agreements to premise any final-status resolution on solving the refugee issue.

In short, when it comes to UNRWA, its critics often complain. But mercifully, this is one rare area where the protagonists seem not to believe fully in their own propaganda.

Inserted in the midst of a protracted conflict, UNRWA works hard not to alienate any party. I saw this in a subtle way on the streets of Gaza: I noticed that the walls surrounding UNRWA installations were decorated with colorful murals, clearly designed not simply to brighten the day of passers-by, but also to pre-empt any attempt to cover those same walls with the political graffiti and posters seen on every other thoroughfare.

So UNRWA continues to work and to keep its head down, because as long as it is able to do so, otherwise bitter enemies are likely to continue to allow it to serve Palestinian refugees until they resolve their conflict. And it is difficult to envision that happening anytime before UNRWA’s youngest students have become parents (and maybe even grandparents) themselves.

Nathan J. Brown is a professor of political science and international affairs at George Washington University.