President Trump once boasted that his base was so loyal that he “could stand in the middle of Fifth Avenue and shoot somebody, and I wouldn’t lose any voters.” Now he’s putting that claim to the test with his immigration proposal. In his State of the Union address Tuesday, Trump offered to support not just legal status, but a path to citizenship for nearly two million illegal immigrants — the “dreamers” who were brought to the United States as children through no fault of their own — if Democrats would agree to fund his border wall and limit chain migration.

It is a remarkable offer that goes far beyond the expected granting of legal status to DACA recipients. And it has outraged many of Trump’s core supporters. Breitbart declared Trump “Amnesty Don” and said that supporters were calling his proposal an act of “political incompetence, malpractice, greed, betrayal, and self-mutilation.” Mark Krikorian, executive director of the hardline Center for Immigration Studies, complained that Trump “promoted his amnesty proposal as legalizing more illegal aliens than Obama’s DACA program, as though that’s a good thing.” Dan Horowitz, editor of Conservative Review, called Trump’s plan “the Self-Impeachment Act of 2018.” Sen. Ted Cruz (R-Tex.) said, “I do not believe we should be granting a path to citizenship to anybody here illegally” and described Trump’s offer as “inconsistent with the promises we made to the men and women who elected us.” Heritage Action declared that his plan “should be a non-starter.”

In other words, Trump is doing something quintessentially presidential: He is taking on his own base in an effort to do something big and bipartisan for the good of the nation. That is what great leaders do.

But far from praising Trump for an act of statesmanship and engaging him in serious negotiations, Democrats have attacked him relentlessly. During his speech they scowled, rolled their eyes and even booed, barely masking their utter contempt for the president. Rep. Joseph Crowley (N.Y.), chairman of the House Democratic Caucus, denounced Trump’s address as “racist,” while House Minority Leader Nancy Pelosi (D-Calif.) complained that although Trump “presents himself as generous” toward dreamers, he’s “holding them hostage” in what she calls the “most extreme anti-immigrant agenda in generations.”

After Democrats shut down the government and then folded without getting anything, Trump could have rubbed their faces in it. Instead, he put a serious offer on the table that included a major concession with his support for amnesty. It was obviously an opening bid, subject to negotiation, but it showed he is serious about reaching an agreement.

What did Democrats do? That same week, Senate Minority Leader Charles E. Schumer (D-N.Y.) — under fire from his left-wing base for his mishandling of the shutdown — announced that his offer to fund a border wall was “off the table.” Schumer knows full well there is no chance of an agreement without funding for the wall.

So this is where things stand: Trump is challenging his base while Democrats are pandering to theirs. The irony is rich. Democrats say Trump is unfit to be president, but when it comes to immigration, he is the one being presidential, while they are behaving like political hacks.

Their reaction raises a question: Do Democrats even want a deal? Or is their hatred of Trump and lust for power so all-encompassing that they can’t bring themselves to sit down with the president, negotiate in good faith and reach a compromise — one that would allow dreamers not only to stay but also to become American citizens, a compromise that would secure our borders and reform our immigration system?

Democrats don’t like some elements of Trump’s proposal, such as his plan to limit chain migration to the nuclear family, which they say would drastically cut legal immigration. Fair enough. Instead of nonstop attacks, they should emulate Trump and make a serious counteroffer with concessions toward his position. For example, they could accept limiting chain migration as long as Trump agrees to expand the number of legal immigrants allowed into the country under the merit-based immigration system that he has endorsed.

There is no reason, with some creativity and goodwill, that an immigration deal cannot be reached. So far, it looks as if there is goodwill only on one side. If the dreamers don’t end up getting the path to citizenship that Trump has offered, it will be for one reason only: because Democrats care more about using illegal immigration to bash Donald Trump than they do about actually helping dreamers.