What does it take to be a humanitarian worker? Idealism and commitment, surely, but also a gift for improvisation. An assignment in a disaster or war zone is by definition chaotic, and those who succeed are those who can solve problems quickly and move on.

I saw a small but telling example of this capacity in a camp for the displaced in eastern Chad, not far from the border with Darfur. Esther Isaac, one of many dedicated African humanitarian workers, was faced with a dilemma. Camp residents, still angry over being displaced from their villages by attacks from Janjaweed fighters (often simply called Arabs) and adamant that they were in no mood for reconciliation, were refusing to accept a certain kind of fencing for their huts. Why? Because it was from “Arab” suppliers. Isaac, then working for the Lutheran World Federation, came upon a solution—the fencing could be used “unseen” as roofing material.

That relatively small achievement revealed the type of action that Brazilian humanitarian Sergio Vieira de Mello would have admired. Vieira de Mello was a lifelong United Nations civil servant and diplomat and a hero to humanitarian workers both inside and outside of the UN. He was killed, along with 21 of his staff, in a car bombing that struck the UN headquarters in Baghdad in August 2003. At the time, Vieira de Mello, at age 55, was nearing the end of a short-term stint as the UN secretary-general’s special representative to Iraq—an assignment he did not welcome, but took out of dedication to the UN and loyalty to Secretary-General Kofi Annan.

As Samantha Power’s book Chasing the Flame: One Man’s Fight to Save the World shows, Vieira de Mello was no stranger to disorder and the many perils of humanitarianism—the philosophy and practice of humans acting to help fellow humans in situations of extreme need. Such action demands a willingness to live with ambiguity at many levels. It is a much messier task than one would guess merely from the traditional definition of humanitarianism given by the Red Cross: “the impartial, independent, and neutral provision of relief to those in immediate need because of conflict and natural disasters.”

Indeed, Vieira de Mello’s career—which stretched over three decades in postings that included Lebanon, Cambodia, Bosnia, Kosovo, East Timor, Zaire and, finally, Iraq—is something of a record of the challenges and tensions, successes and failures the UN and humanitarian groups have faced during the past 30 years.

Power is well suited to tell this story. She has been a professor at the John F. Kennedy School of Government at Harvard, and she won the 2003 Pulitzer Prize for her landmark A Problem from Hell: America and the Age of Genocide. Power was recently named by President Obama to the National Security Council as senior director for multilateral affairs. (In her acknowledgments to Chasing the Flame, Power praises Obama as “the person whose rigor and compassion bears the closest resemblance to Sergio’s that I have ever seen.”)

Power seems to have interviewed nearly everyone Vieira de Mello knew or worked with. While clearly admiring Vieira de Mello, she notes his flaws—including the fact that he was a largely absent father and husband who was not terribly discreet about his affairs with female colleagues.

Still, Vieira de Mello was known as a gracious and thoughtful, if occasionally short-tempered, boss who in personal relations was kind and generous. Fellow humanitarians admired him in part because, as a Church World Service colleague of mine who met Vieira de Mello in Bosnia recalls, “he seemed to really listen and absorb and then would respond in what were really insightful ways to what he had heard. He didn’t come across as knowing all the answers but rather as someone who really absorbed what he had seen and heard before forming conclusions.”

Power also makes clear that a key reason Vieira de Mello shined so brightly at the UN, aside from his obvious talents and fierce loyalty to the institution, was that there were so few stars at the UN. “Sergio will fix it” was virtually a mantra at the UN. Vieira de Mello was seen, both by himself and others, as a likely successor to Annan as secretary-general.

Vieira de Mello was not immune from criticism both within and outside the UN, however, especially for placing too high a premium on good relations with those in power in such places as Bosnia, Cambodia and Kosovo. From his point of view, Vieira de Mello made the deals he needed to make to address human needs. But in the Balkans, Vieira de Mello’s good relations with Serbian leaders earned him the nickname “Serbio.” British journalist William Shawcross kidded Vieira de Mello that “his eventual autobiography would be aptly titled ‘My Friends, the War Criminals.’”

Vieira de Mello, Power writes, “had blind spots and made many mistakes, but he never stopped questioning his own decisions or those of the world’s governments.”

Thus, at the very time he was arranging food deliveries, organizing refugee returns, or negotiating with warlords, he was also pressing colleagues to join him in grappling with such questions as: When should killers be engaged, and when should they be shunned? Can peace be lasting without justice? Can humanitarian aid do more harm than good? Are the UN’s singular virtues—impartiality, independence, and integrity—viable in an age of terror? When is military force necessary? How can its inevitably harmful effects be mitigated? He did not have the luxury of simply posing these questions. He had to find answers, apply them and live with the consequences.

Living with consequences is a part of the reality of humanitarianism that has steadily risen in visibility (and scholarly debate and criticism) in recent years. After World War II, the purview of humanitarianism belonged almost solely to the UN (which responds to emergencies in a host of ways through its related agencies, such as the World Food Program and the High Commissioner for Refugees) and, among agencies in the U.S., to a few church-based groups founded in the war’s wake, such as Church World Service and Lutheran World Relief. But by the height of Vieira de Mello’s career in the 1990s, disaster zones were flooded with dozens, even hundreds, of nongovernmental organizations, many with overlapping roles and missions. The growth of the NGO world was due to a host of reasons: high-profile events like the postgenocide Rwandan refugee crisis; the effects of globalization and a growing global economy; expanded media reach; and the fact that with the demise of the cold war there was more space in which the UN and humanitarian agencies could do their work.

Also hovering in the background and gaining wide currency was the concept that states could intervene in the affairs of other states for humanitarian reasons—the foundational idea for “humanitarian intervention,” which gained currency in the 1990s.

Vieira de Mello was too dedicated a worker, and knew too much about the world’s realities, to be taken in by any ideas of humanitarianism’s glamour. Nonetheless, he felt, at the end of the cold war, that the UN’s long-overdue hour had arrived. As Power notes: “In a world of conflict, repression, and extreme poverty, he had come to see the UN as the only body that could serve both as a humanitarian actor in its own right and as a platform for governments to identify common interests and pool their resources to meet global challenges.”

Another perspective on humanitarian response and the global challenge comes from Michael Barnett and Thomas Weiss. In a recently published volume of essays titled Humanitarianism in Question, they argue that in today’s world “a stripped-down state pursuing structural adjustment programs increasingly is obliged to call on outside humanitarianism to provide basic social services. . . . Aid agencies, in short, are becoming welfare workers as the neo-liberal state outsources its basic welfare functions while focusing on the needs of the private sector.” This ultimately leads to tricky issues of humanitarianism’s relationship to power:

Humanitarian organizations have been in painful self-denial about their relationship to power, preferring to see themselves as weak and vulnerable as those whom they are helping. But their growing resources, their broader ambitions, and their relationship to global structures puts front and center the issue of power. Humanitarianism is largely understood as the ultimate of ethical acts, but a range of ethical positions leads to a range of different evaluations of humanitarian action, suggesting that one person’s noble act might be another’s sin.

For example, the wars in the Balkans rendered the UN powerless to do much except fly food supplies to besieged Sarajevo. In this activity, the UN was reduced to coordinating flights with the very Serbian troops who were shelling the Bosnian capital.

Vieira de Mello called the world’s inaction in the face of the Rwanda genocide “the gravest single act of betrayal ever committed by the United Nations.” The resulting cross-border refugee crisis in Zaire—in which the UN and aid agencies in effect fed, housed and clothed Rwanda’s genocidaires—turned into a much-studied fiasco. In both cases, the willful lack of any meaningful political response by powerful UN members (the Western powers and China) resulted in problems being dealt with after the fact as humanitarian problems. (This dynamic has continued, with tragic results, in Darfur and neighboring Chad.)

Vieira de Mello came to realize all of this. He was constrained not only by institutional constrictions but also by the limits of what was available to the UN and other humanitarian actors. “In Bosnia, we humanitarians may have been fig leaves for Western powers,” Vieira de Mello later told a colleague, “but in Zaire we were invisible and irrelevant. I’m not sure which was more pathetic.”

Power writes that Vieira de Mello urged UN officials to accept “that humanitarian crises are almost always political crises, that humanitarian action always has political consequences, both perceived and real.” Since everybody else was playing politics with humanitarian aid, he wrote, “we can hardly afford to be apolitical.”

Vieira de Mello was an exemplar of what Power calls “principled, flexible pragmatism that can adapt to meet diffuse and unpredictable challenges.” Such an approach can lead to a complex relationship with evil—a point of interest for Vieira de Mello, who earned a doctorate in philosophy from the Sorbonne and was a professed nonbeliever who scorned the Roman Catholicism of his youth but who late in life showed a growing interest in Buddhism.

While Power’s biography of Vieira de Mello does not cite any reading of Christian thinkers, it is hard not to think that Vieira de Mello would have appreciated the insights of theologians who have grappled with the dynamics of evil and tragedy. It is easy to imagine him agreeing with Dietrich Bonhoeffer, who in 1929 wrote that humanity “must learn the paradox that the world offers us a choice, not between good and evil, but between one evil and another.” (Power writes that Vieira de Mello often told colleagues that they had to “choose the least bad option” and chided an associate he thought was being too sanctimonious by saying, “You can’t just come riding in on that great white horse of moral principle; you have to solve the problem.”)

For Vieira de Mello, solving problems and choosing “the least bad option” involved sitting across the table from such unsavory groups as Cambodia’s Khmer Rouge, who committed some of the worst acts of genocide in the postwar period. Though the Khmer Rouge were deemed “loathsome” by UN staff and other humanitarians, Vieira de Mello was willing to meet with the group’s leaders not only because he thought humanitarian good would come of it (he wanted to end a protracted refugee crisis), but also because as a trained philosopher and a onetime student radical in the late 1960s and early 1970s he was, Power suggests, “intrigued” by the Khmer Rouge’s evil. (“Was there a moment when they turned down the wrong path,” he wondered, “or was the ideology destined to be carried to its extreme?”)

Still, Vieira de Mello nearly always bowed to the humanitarian imperative—the core belief in providing “food, medicine, and educational services to civilians.” That sense of obligation sometimes puts humanitarians at odds with human rights advocates, as in the case of Darfur. While the advocacy community pushed for an International Criminal Court indictment of Sudanese president Omar al-Bashir, aid agencies that do the feeding in Darfur’s displacement camps have, out of necessity, remained generally silent on al-Bashir’s recent indictment, knowing that they stand a good chance of joining other groups which have been expelled from Sudan if they speak out.

Vieira de Mello’s work in Afghanistan in the late 1990s, while head of the UN’s humanitarian coordination body, was also instructive. At the time, war-weary Afghanistan was a devastated—dare I say, accursed—place, and the UN’s relationship with the ruling Taliban was rocky at best. The Taliban refused UN humanitarian assistance that was conditioned on providing educational opportunities for girls. Humanitarian workers from the UN and the Red Cross were even physically assaulted by a Taliban governor of Kandahar in southern Afghanistan. Eventually, Vieira de Mello recommended that UN agencies pull their inter national staff members out of Kandahar and suspend operations.

But it was a short-lived decision, and though the Taliban regime was, as Power writes, “brutal and erratic,” Vieira de Mello held steadfast to the idea of the humanitarian imperative and doggedly tried to keep UN aid flowing. Was that the right decision? I know from visiting Afghanistan in the summer of 2001—just weeks before September 11 and at a time when the country was suffering from extreme drought and few outside the humanitarian community were paying much attention to Afghanistan—that the work of the UN and aid agencies kept many Afghans alive.

But working with the Taliban exacted a cost. Neither Vieira de Mello, the UN nor major powers like the United States, Power writes, “seemed to appreciate the extremity of the crisis brewing in Afghanistan.” Publicly at least, Vieira de Mello took the Taliban at their word that the problem of Osama bin Laden and al-Qaeda was under control. Of course it wasn’t—one example of several in which Vieira de Mello heard what he wanted to hear.

From Vieira de Mello’s life Power culls many useful questions (which were actually Vieira de Mello’s): When should actors like the Taliban be engaged? When does humanitarian assistance do good and when does it do harm? Is it viable for the UN to be impartial?

Responding to the results of wars and natural disasters defies ready-made solutions; if Vieira de Mello too often felt he had to appease those in power, he did so as a pragmatist who believed compromise could benefit the lives of the voiceless and powerless—the poor women of Afghanistan, the displaced of Bosnia and Kosovo, the brutalized of East Timor, the aggrieved of Rwanda.

Vieira de Mello knew from experience that the UN and aid agencies are imperfect; Power suggests that by the end of his life, he knew all too well that in Iraq, the UN was largely a handmaiden of the U.S. Perhaps the lesson is that too much can be asked of nongovernmental organizations in the cleanup operations of war.

Vieira de Mello felt this keenly, and yet, almost endearingly, he remained a company man. After the debacles of Rwanda and Bosnia, the French philosophers André Glucksmann and Bernard-Henri Lévy publicly criticized the UN’s performance. “The time of the UN has passed. We have to finish off this macabre face which the UN has become,” Lévy declared. Vieira de Mello fired off an angry reply, saying it was easy for well-heeled French philosophers “to caricature, to ridicule, to defame” the United Nations “from the comfort of their Parisian homes.” In the end, Vieira de Mello said, such criticism would contribute nothing to the concrete improvement of the lives of those displaced and uprooted.

By the end of his life, Vieira de Mello realized that humanitarianism had plenty to account for. But this gifted civil servant also knew that in a world riven by wars, by state and nonstate violence and by rigid ideologies, there are not many alternatives.