President Trump needs a face-saving way to call off his government shutdown. No matter how much he tries to blame the situation on the Democrats, he went on live TV and said he would be "proud" to own the shutdown, and there is simply no spinning that away. That's why the incoming White House Chief of Staff Mick Mulvaney is now desperately tying to find a way out, even signaling that Trump will accept an unstated amount less than $5 billion for his wall.

Democrats should acquiesce on one condition: That Trump legalize all the DREAMers (people who were brought to this country without proper authorization as children) whom he jeopardized when he scrapped the Obama-era DACA program and all those whom he kicked off their "temporary protected status."

This would no doubt be hardball. But given that Democrats are poised to take control of the House next year, they have a far stronger political hand than during the January shutdown when they were forced to back down because Republicans controlled all the branches of government.

The wall is, of course, dumb. It will waste taxpayer money while accomplishing diddly in terms of national security. Drug smugglers will find ways to breach it given the enormous profits at stake. And it will do nothing to keep out visa overstays, half of the unauthorized population. It will also simply never be completed because $5 billion is less than a quarter of what would be required to cover the entire 2,000-mile-plus Southern border and what Trump — the "great negotiator" — walked away from during the last shutdown.

But how much harm would a partially-built wall really do? Funding it would not even qualify as a drop in a $4 trillion budget. Meanwhile the potential upside of a deal, if Democrats are effective, is huge.

The mystery is why they haven't already put a wall-for-DREAMer deal on the table. It's not like they have any major moral qualms about the wall. After all, Barack Obama, Hillary Clinton and Chuck Schumer along with 23 other Democratic senators voted "yay" for the 2006 Secure Fence Act that put up seed money for the first installment of the wall.

Democrats claim that Trump has already ruled out legalizing DREAMers so there is no point asking for such a deal. But they have to know his posture is just a negotiating tactic. Trump owns the shutdown and if he walks away he'll look even worse, not just with Hispanics but the vast majority of Americans who want the DREAMers legalized.

The more plausible explanation is that now that courts have barred the administration from scrapping DACA and TPS, Democrats no longer fear that mass deportations of DREAMers are imminent. Hence, they'd rather not fight for full legalization if that means denying Trump a symbolic victory on the wall. Plus they want to keep the issue alive for the 2020 election to encourage Hispanics to turn out to vote.

That is not just cynical, but a massive miscalculation.

The administration's efforts to scrap DACA and scale back TPS are on sound legal footing. (TPS holders, remember, are folks fleeing natural disasters or turmoil who have been given permission to live in the country on a renewable basis till things stabilize in their native countries. But Trump cut six countries including El Salvador, Haiti, and Nicaragua from the program, setting up about 98 percent of TPS recipients for deportation if they didn't voluntarily leave by the end of this year.) Even though liberal lower courts have ruled against the administration, the conservative Supreme Court isn't likely to go along.

The Immigration and Nationality Act hands the president vast prosecutorial discretion to set immigration enforcement priorities as he sees fit. That's why former President Barack Obama was perfectly within his legal rights to implement DACA and defer the deportation of DREAMers. But, by the same token, Trump can reset these priorities and scrap the program.

The TPS program, likewise, is up to the president's discretion. As its name suggests, it only lets affected immigrants temporarily stay in the country and it's up to the executive to decide when their time is up. Just because previous presidents have let these migrants stay for decades does not mean that Trump is legally required to do so.

Should the Supreme Court rule for the administration, there would be literally no avenues left to prevent this administration from conducting mass deportations of people who have built lives in America. Furthermore, having missed their big opportunity to fight for DREAMers' permanent status, Democrats will be in no position to make the moral case to let them stay.

The political upshot of this will be that while the deportations will energize the president's base, it will demoralize the Democratic base already sour from all the deportations that President Obama conducted.

It would be smart politics — and good principle — for the Democrats to use Trump's desire for the wall to drive a hard bargain and force him to back off his assaults on DREAMers and TPS holders.

The government will finally reopen. The question only is if Democrats will squander the leverage that Trump's shutdown gambit has handed them or use it to do some good.