Outgoing United Nations Ambassador Nikki Haley claimed she has used President Donald Trump’s frequent bombast and belligerence as a bargaining chip to “get the job done” at the U.N. and “keep him from going too far.”

“He would ratchet up the rhetoric, and then I’d go back to the ambassadors and say: ‘You know, he’s pretty upset. I can’t promise you what he’s going to do or not, but I can tell you if we do these sanctions, it will keep him from going too far,’” she said in a “Today” show interview that aired Wednesday.

“I was trying to get the job done,” she added, when asked if she tried to play “good cop bad cop.” “And I got the job done by being truthful, but also by letting him be unpredictable and not showing our cards.”

Haley said she has tried to disregard Trump’s frequent streams of inflammatory and false comments on Twitter.

“I’m disciplined enough to know not to get into the drama,” she said.

Anadolu Agency via Getty Images Outgoing United Nations Ambassador Nikki Haley said she has tried to disregard President Donald Trump's comments on Twitter.

The U.N. ambassador took a more forceful tack on the Saudi government’s killing of journalist Jamal Khashoggi — another departure from Trump, who has repeatedly taken the Saudis’ denials at face value.

“I think we need to have a serious hard talk with the Saudis to let them know we won’t condone this, and don’t do this again,” Haley said.

She also suggested that Trump’s son-in-law and adviser Jared Kushner should re-evaluate his relationship with Saudi Crown Prince Mohammed bin Salman.

“We have relationships with lots of countries, and our goal is to make those relationships better,” she said. “But when these things happen, we have to step back and never back away from our principles.”