President Donald Trump speaks about the partial government shutdown, immigration and border security in the Diplomatic Reception Room of the White House in Washington on Saturday. Credit: Alex Brandon | AP

President Donald Trump could make a lot of history — good history — in the next two weeks. But to do so, he needs to reach back to his inner gambler. If he tosses aside the counsels of his usual advisers on immigration, Trump can break the deadlock, fix the border-security immigration mess, and in so doing, earn a lasting place in U.S. history among the most consequential presidents.

Former Secretary of Defense Robert Gates is one of those people who, when they write an OpEd, everyone on the responsible center-right should read and ponder what it says. His OpEd, published on Friday in the Wall Street Journal, takes a couple of unnecessary, counterproductive shots at Trump that may handicap the reception of Gates’ major message at 1600 Pennsylvania Ave., but hopefully Trump and senior advisers look past that to the core message: Go big — very big — to solve the impasse. And go in an unexpected direction.

President Lyndon B. Johnson relished, as a Southerner especially, being the president to deliver the Civil Rights Act of 1964. No fair reading of the history of those critical laws can overlook Johnson’s absolutely essential decision to throw in with a politically perilous position that ran counter to his solid supporters in the segregationist South. As Michael O’Donnell summarized in 2014, Johnson went big, and history has been rightfully kind to him. As harsh as the judgments about his Vietnam policy have been, Johnson is always at least partially redeemed from his vulgar, often self-interested dealings and his disastrous war policy by this magnificent decision to demand equality for all Americans regardless of race.

But “going big” today on border security and immigration means going bigger than what Trump offered Saturday or Gates outlined Friday. “Going big” would mean embracing Sens. Rob Portman’s, R-Ohio, and Jerry Moran’s, R-Kansas, proposal for a $25 billion border security endowment — and, indeed, increase that funding level — the earnings from which would be available to Trump and future presidents to always keep the border as secure as possible by whatever mix of means prove most effective.

To get a permanent fix for barriers and technology funding via a large endowment, Trump has to offer more than a temporary fix for the Deferred Action for Childhood Arrivals (DACA) program, as well. To secure the funding and thus border security, Trump must secure the position of the more than 10 million people in the country without permission. That includes the “Dreamers,” of course, but it would go far beyond the DACA and temporary protected status populations.

The goal should be regularization of all but the sliver involved in violence and crime. For everyone else, a path to permanent residence should be laid out. Regularization boards in every county could quickly sort through and approve for regularization most of the undocumented population — withholding regularization from those whose records indicate they have brought violence or crime into the county. Eligibility for citizenship 25 years after first adult entry or 10 years after entry as a minor (with future crime or violence earning a quick exit back to the country of origin) vaporizes all but ideological extremist opposition. Building serious border barriers while also executing regularization reform quickly minimizes the incentive to head north. Restricting eligibility to those who entered the country before 2019 redoubles the deterrent. And a harsh crackdown on employers of the non-regularized will put teeth into the big deal.

All it takes is a president with an eye, indeed a fixation, on history’s judgment and an awareness of the Johnson precedent. The new law need not be long and convoluted, because Trump really can pull off a domestic “Nixon to China” here. He can order the law be concise, its delegations to the counties complete and nonbureaucratic. He has, after all, set the table for a big breakout with the shutdown and Saturday’s speech. Even the Democrats’ reflexive rejection of his opening offer Saturday plays to Trump’s advantage.

Go big, Mr. President. Solve the interrelated problems of border security, the “Dreamers” and, yes, all the undocumented.

Go big, Mr. President. Write a chapter in this history books to rival Johnson’s.

Hugh Hewitt, a Washington Post contributing columnist, hosts a nationally syndicated radio show and is author of “The Fourth Way: The Conservative Playbook for a Lasting GOP Majority.”