President Donald Trump has shown an exasperating ability to send mixed signals on important issues, few more exasperating or important than illegal immigration. The disconnect was on full display Tuesday.

At a luncheon, the president told journalists that he supports reforms that would grant legal status to millions of immigrants here illegally who have not committed serious crimes, and perhaps provide a path to citizenship for Dreamers, those brought here as children.

advertisement | advertise on newsday

In his speech before Congress that night, he spoke of reforming the nation’s legal immigration system; we await details. But Trump, whose recent executive order expands the pool of potential deportees, also starkly evoked the dangers of illegal immigration and said he’d created an office to serve victims of crimes committed by such immigrants. In the audience were family members of Americans killed by immigrants here illegally; the relatives were guests of first lady Melania Trump.

The president is skilled at the art of misdirection, lacks a consistent ideology and always plays to the audience before him, so it’s difficult to judge the sincerity of his earlier remarks. But he also is a dealmaker, he likes to “win,” and his largest audience is the American people. And most of them — 77 percent of registered voters in a Harvard-Harris poll released last week — favor comprehensive immigration reform along the lines he mentioned at that lunch.

Yes, Trump was elected in part on a promise to secure our borders. He should do that, and deport criminals here illegally, too. But he also should stay in touch with the humanity he has shown in his remarks about the unfairness of deporting Dreamers, and push for reforms that most of the nation wants but that have eluded a generation of policymakers.

Trump’s core supporters might not like it. This will test both his ability to lead and the strength of his commitment to unify a fractured country. Negotiation is his self-professed strong suit. Trump should use his skill to broker a good deal on immigration reform. That would be a win everyone could celebrate.