Brendan McDermid / Reuters

During her confirmation hearing to be President Donald Trump’s envoy to the United Nations, Nikki Haley told U.S. senators, “I will never shy away from calling out other countries for actions taken in conflict with U.S. values and in violation of human rights and international norms.” For the most part, Haley, who announced Tuesday that she would step down at the end of the year, held true to that commitment.

Yet at the same time, she was unsparing when the issue of human rights conflicted with American policy or that of its allies, as it did when she announced in June that the United States was withdrawing from the UN Human Rights Council because of, among other things, its “chronic bias against Israel.”

Akshaya Kumar, the deputy UN director at Human Rights Watch, told me that Haley seemed to justify her decision to pull the United States out in narrow terms, making it “basically all about Israel, ignoring the good work the council does all around the world.” “We’ve seen her very willing to embrace rights-based rhetoric on issues like Iran, Venezuela, and Nicaragua, even South Sudan or Congo, but then ... shying away from it when it’s geopolitically inconvenient like in a place like Yemen or even Iraq or Syria,” Kumar said.

Haley is hardly alone in this policy dissonance: Both Republican and Democratic administrations have used the issue of human rights to attack their adversaries, while being selective about the actions of their allies. But while her predecessors merely threatened international organizations when they appeared to act against U.S. interests, Haley not only acted but made clear that U.S. foreign aid was conditional on countries supporting the United States at the United Nations.

Haley also appeared to personalize the debate over the U.S. withdrawal from the UN Human Rights Council, Kumar said. “She actually made it a point at the [U.S.] mission [to the UN] to stop talking to certain human-rights groups, including ours, because we disagreed with her on the Human Rights Council question,” Kumar said.

Haley’s strongest moments at the UN centered on her defense of the world’s most dispossessed people. She was a vocal opponent of Iran, using her position not only to excoriate its theocratic regime, but also its abysmal human-rights record. She called out Russia as well, blasting its support of the Assad regime in Syria and the massive humanitarian casualties prompted by the conflict in that country. She slammed Myanmar’s “planned, premeditated, and coordinated” violence against the Rohingya, as well as China’s “re-education” camps for the Uighurs, a mostly Muslim minority group in Xinjiang province. Haley also defended Christians in the Middle East who face persecution across the region. She focused attention on the humanitarian consequences of Nicolás Maduro’s policies in Venezuela and warned that Nicaragua, under Daniel Ortega, was going the same way. She visited camps in the Democratic Republic of Congo, Ethiopia, and South Sudan, at one point being moved to tears over, as she later said, “hundred-plus kids that were chasing our cars and seeing us off. All I kept thinking was, what’s going to happen to them? The sad reality, as it looks now, is that they are going to end up just like their parents.” Perhaps most significantly, she spoke out against Saudi Arabia’s human-rights record and urged the U.S. ally to show restraint against civilians in Yemen where the Saudi military, along with that of the United Arab Emirates, is fighting the Iran-backed Houthi rebels.

Haley was perhaps the most vocal member of the Trump administration on many of these issues. But like President Trump, who often appears to treat foreign policy as a series of transactions undertaken to achieve his short-term objectives, Haley too often appeared to link U.S. financial support for the world’s poorest places to their support of U.S. initiatives at the UN. She threatened to withdraw U.S. foreign aid from countries that vote against U.S.-proposed policies at the UN. She also backed a campaign to suspend U.S. aid to Palestinians who were incensed by the Trump administration’s recognition of Jerusalem as Israel’s capital. (Jerusalem’s status is disputed under international law. Israel claims all of it as its capital; Palestinians want East Jerusalem as the capital of a future state.) When asked about the possibility of the United States ending its funding of the UN Relief and Works Agency for Palestine Refugees in the Near East (UNRWA)—a possibility that was ultimately realized—Haley replied: “First of all, you’re looking at the fact that there’s an endless number of refugees that continue to get assistance. But more importantly, the Palestinians continue to bash America.” She also pointed out that the Palestinians had boycotted the Trump administration’s attempts to kick-start the peace process with the Israelis. As Foreign Policy’s Colum Lynch pointed out, it was a remarkable turnaround by a U.S. official who had previously protected funding for UNRWA from its adversaries in the Trump administration.

One of the most notable examples of this transactional view of relations was Haley’s animosity toward the UN Human Rights Council. Last year, she warned that unless the council changed how it functioned, the United States would “pursue the advancement of human rights outside of the council.” In June, she made good on that promise, noting that the council was a “protector of human-rights abusers.” But as Lauren Wolfe wrote in The Atlantic at the time, the U.S. withdrawal had much to do with preventing the U.S. from being called out on its own alleged human-rights abuses. (I have argued that Haley’s criticism of the council wasn’t disproportionate.)

In her announcement on Tuesday, Haley said of the Trump administration’s approach to the world: “Now the United States is respected. Countries may not like what we do, but they respect what we do.” It might be too soon to tell if that’s true, but Haley’s tenure at the UN is as likely to be remembered for her defense of human rights as it is for her broadsides against U.S. adversaries. Last December, as the UN voted to criticize the Trump administration’s decision to move its embassy to Jerusalem, Haley wrote on Twitter that the U.S. is “always asked to do more [and] give more” at the UN, but is targeted by “those we’ve helped.”

“The U.S.,” she wrote, “will be taking names.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.