Washington is aghast over the news that, during a closed-door meeting with congressional leaders, President Donald Trump asked if we could exclude immigrants from “s---hole” countries such as Haiti and the nations of Africa. If true, what Trump said is terrible. But what the Democrats did is worse.

We do not know who originally leaked the president’s comment, though only Democrats benefit politically from embarrassing Trump in this way. But regardless of who was responsible for the original leak, Sen. Richard J. Durbin, D-Ill., the minority whip, publicly confirmed what the president said during a closed-door negotiation, declaring that Trump “said things that were hate-filled, vile and racist,” and adding, “I cannot believe that in the history of the White House, in that Oval Office, any president has ever spoken the words that I personally heard our president speak yesterday.”

I’m sure it felt good for Durbin to get that off his chest. But does he think that publicizing what the president said in a closed-door negotiation has made an immigration deal more or less likely?

Last week, Democrats had a productive meeting with the president, during which he expressed a desire to help legalize not just the “dreamers” — those immigrants brought here illegally as children — but also the vast majority of the nearly 11 million illegal immigrants in this country who have not committed crimes. At one point, Trump turned to Durbin and said, “You want to know the truth, Dick? If we do this properly, DACA, you’re not so far away from comprehensive immigration reform. And if you want to take it that further step, I’ll take the heat, I don’t care. . . . I’ll take the heat off both the Democrats and the Republicans.”

This was an extraordinary offer from a president who has made cracking down on illegal immigration a central tenet of his agenda. Indeed, it is precisely because of Trump’s anti-illegal-immigration bona fides that he may be able to deliver what Republican and Democratic presidents before him could not. Just as only Richard Nixon could go to China, Trump may be the only president who can sign comprehensive immigration reform into law.

In other words, Democrats are perhaps faced with a once-in-a-lifetime opportunity to resolve this issue. Knowing this, if you are a Democratic leader who truly cares about the fate of illegal immigrants, and you are in a closed-door meeting with a president who can lead them out of the shadows, and that president makes a crude remark, what do you do? Do you ignore it and keep working toward an agreement that could change millions of lives? Or do you publicize what the president said in order to score political points? If you truly care about the fates of human beings whose futures depend on the outcome of your negotiations, you keep quiet.

What Durbin should have said was: “What is said between the president of the United States and the second-ranking Senate Democrat during a closed-door negotiation stays behind closed doors. I’m committed to working with the president to pass a bill.” Violating the confidence of the president to publicly embarrass him does not facilitate an agreement. It only helps to kill the negotiations so Democrats can blame the president and keep the issue alive for this year’s midterm elections.

A party’s priorities are defined by the choices it makes. Yes, Trump’s comment was reprehensible. but he was willing to cut a deal to let hundreds of thousands of illegal immigrants stay. Democrats took shots at the president at the expense of hurting those they claim to be fighting for. In doing so, they showed they don’t care about the dreamers. They don’t care about illegal immigrants. All they care about is getting Donald Trump, no matter who gets hurt.