The opinions expressed by columnists are their own and do not necessarily represent the views of Townhall.com.

On Saturday, Donald Trump shrewdly flipped the table on Nancy Pelosi in the government shutdown standoff. He has now proposed a grand bargain on immigration: legalization of some 1 million so-called Dreamers -- the foreigners who were brought into the U.S. illegally by their parents -- and an immediate end to the shutdown, if she agrees to expand funding to $5.7 billion for the wall.

It's the kind of checkmate political maneuver that may guarantee his re-election.

It's smart because it now puts the onus on Pelosi to open the government. It also puts the pressure on Pelosi to act on immigration reform. For 25 years, Democrats have preferred to politicize the immigration issue -- and treat Hispanic voters as political hostages -- rather than agree to a bipartisan solution to deal with the 10 million illegal immigrants residing in the U.S.

There's no good option for Pelosi now.

If she says yes to this deal, Trump fulfills a critical campaign promise -- build the wall -- and he can take political credit for a humane and popular way to give "Dreamers" the right to stay in this country. He can boast about this in his State of the Union and tell voters that he achieved an immigration solution that none of his predecessors -- not even Barack Obama -- could. He can boast of the wall and freedom from government persecution for the "Dreamers."

He can also score big gains with Latino voters. Many believe that Trump dislikes them and is "racist." This deal -- combined with the best job market for Hispanics in 50 years -- would show immigrants that Trump cares about them and has taken significant actions to improve their lives and their economic opportunities. If Pelosi says no to the "DACA for the wall" deal, suddenly, she will be the hardheaded one keeping the government shut down. She will have rejected a deal that most Americans will regard as fair and reasonable.

She will also now be seen as the obstacle to immigration reform. My Democratic friends on Capitol Hill tell me privately that the last thing Pelosi wants is for Trump to take credit for solving the immigration crisis and making headway with Hispanics. This is why she rejected a previous proposal by Trump to legalize "Dreamers".

Many Latino voters will see that she is more interested in political power than in taking positive steps to actually help prevent a family member from facing deportation. If Trump can win 10 percent more of the Hispanic vote, no Democrat could defeat him.

Yes, the devil is in the details of the DACA deal. This should not include a path to citizenship. Citizenship would reward an illegal act. It also must not be an "amnesty," but rather an "earned legalization." The "Dreamers" should qualify if they pay a fine for their illegal entry and there must be very strict prohibitions imposed on DACA residents against obtaining welfare benefits in the future. Most immigrants who are hardworking would accept those conditions in a heartbeat.

Trump might also put on the table an expansion of the H-1B program that allows highly talented engineers, mathematicians, scientists and others with specialized skills to come and stay in the U.S. They create far more jobs than they take.

Trump is to be commended for accepting a political reality: The "Dreamers" are going to get legal status at some point and why not now so Trump can take credit. Republican political pollster Ed Goeas has recently noted that this would combine two popular concepts at once -- the wall and DACA.

The political chaos from the government shutdown isn't working in the president's favor. He needs an exit strategy. DACA for the wall turns the politics of the government shutdown upside down and Trump will come out a big winner -- at Pelosi's expense. Well done, Mr. President.