President Trump has a choice. Democrats in Congress have offered to provide billions of dollars for one of his signature campaign proposals: a wall (or something akin to it) along the U.S.-Mexico border. But in exchange, they want a provision that would grant protection from deportation and create a path to citizenship for young undocumented immigrants brought to the U.S. as children. In other words: Trump can have the wall, but he must accept what his political base will very likely call an “amnesty.” Or, he can pass on the whole thing.

So far, Trump has opted for no wall and no amnesty. And I think he is making a logical and perhaps even smart political decision.

Last week’s Senate immigration debate showed that Trump’s preferred approach — funding the border wall, placing new limits on legal immigration and creating protections for the young immigrants — has little chance of becoming law. It was voted down in the Senate 39-60; the legislation drew opposition from 46 Democrats and Democratic-leaning independents and 14 Republicans, some of whom joined Democrats in expressing opposition to the proposed new limits on legal immigration.

But Trump could have gotten the wall funding in a bill that also would have put an estimated 1.8 million undocumented immigrants on a path to citizenship (basically enshrining President Obama’s Deferred Action for Childhood Arrivals program into federal law and going further — DACA does not include a citizenship route). Instead, the White House aggressively opposed that legislation, a move that made it politically more difficult for Republican senators to back it. So that bill failed, too, getting only eight Republican votes.

The immigration debate isn’t really over, though, because the future of DACA and its recipients remains unclear. Trump has said the program will end after March 5, but two federal courts have blocked the administration’s policy to suspend DACA. So for now, it lives.

Trump could still make the wall-for-DACA deal, of course. But I doubt that he will, which might seem like a surprising decision, considering the nature of his campaign. At rallies, Trump supporters chanted, “Build the wall!” — sometimes before he delivered that line himself. It was perhaps the second-best-known line of his campaign, after his promise to “Make America Great Again.” Trump has now turned the wall, which many commentators considered outlandish in 2015 when he introduced it, into a proposal that was about to be approved by Congress. (Of course, the “wall” proposal that Congress is considering isn’t exactly what Trump pitched on the campaign trail — Mexico isn’t paying for it, and how “beautiful” it is remains to be seen.)

Shifting the immigration debate in Washington toward his positions is a huge political success for Trump. Polls suggest that voters broadly share Democrats’ views on immigration issues. For example, an overwhelming majority of voters, including Republicans, support a path to citizenship for DACA recipients — and that’s without any kind of new border security measures attached. In contrast, a solid majority of Americans oppose building a border wall, even as a majority of Republicans generally support it.

So why didn’t Trump take the victory on the wall and accept citizenship for DACA recipients, pocketing a win for his base (the wall) but also taking a position backed by most voters (DACA)? I think it’s because the backlash to extending citizenship to nearly 2 million people was potentially greater than the upside of getting the wall built.

First, it’s not clear that Trump will face a backlash if the wall isn’t built. Some Trump allies have said that his supporters took the candidate’s rhetoric about the wall and other issues during the 2016 campaign “seriously, but not literally.” Indeed, in interviews with Republican voters, I’ve found that many interpreted Trump’s push for a border wall more as a pledge that he would take conservative stands on immigration than as a promise for the creation of a Great Wall of China-style structure.

Some polls show that Trump voters did expect a real wall, but here’s what’s even clearer: Among Republicans, Trump is more popular than the wall. Trump is edging close to a 90 percent approval rating from members of his party in some surveys. In contrast, support for the wall among Republicans is often in the high 60s and 70s, with about a quarter of Republicans opposing it.

Second, Trump could face a backlash if he were to sign a bill granting citizenship to a large group of undocumented immigrants. Important forces in the Republican Party — many in the anti-establishment wing — are strongly opposed to the DACA citizenship proposals, including political groups like Heritage Action, media figures at outlets such as Fox News and Breitbart, deeply conservative members of Congress like Sen. Ted Cruz and conservative activists such as Corey Stewart, who served a stint as a co-chair of Trump’s 2016 campaign in Virginia.

Had Trump pushed hard for passage of a bill that included a DACA provision along with the wall, I think these oppositional forces would have mobilized against those proposals and moved the broader GOP electorate against them, too.

Trump’s taking heed of the wishes of more conservative, anti-establishment figures in the party, instead of taking a path that might have appealed to more moderate Republicans, fits with the general pattern of his nearly 13 months in office. He and his administration joined with the House Freedom Caucus and other conservatives in the party to push for the repeal of Obamacare and for the passage of a tax policy bill that gave much of its benefits to the wealthiest Americans, despite doubts from moderate Republicans about both of those proposals. Trump strongly embraced the House Intelligence Committee’s recent decision to release the so-called Nunes memo criticizing the FBI’s conduct in the investigation into Russian interference in the 2016 election, over the objections of more moderate Republicans and the bureau itself. Perhaps rewarding the president’s loyalty to their goals, Fox News personalities and Freedom Caucus members have been among Trump’s strongest allies when it comes to the investigation, which is looking into whether Trump or his advisers improperly coordinated with Russian officials. These conservatives have repeatedly questioned whether the FBI, the Justice Department and the office of special counsel Robert Mueller are treating Trump fairly.

So we should not have been surprised that when senators from the party’s more establishment wing, including Jeff Flake of Arizona and Lindsey Graham of South Carolina, were on one side of the immigration debate (backing the bill that included funding for the wall and the DACA citizenship provision) and Fox News’s Laura Ingraham was on the other (leery of a big immigration deal), Trump took the Ingraham side. Trump’s base is the right-wing, insurgent, fiercely anti-illegal-immigration side of the Republican Party, and he seems to both understand that and be eager to keep them in the fold.

This approach means that Trump may never get the wall built. But he also has not created any new barriers between himself and his most loyal and helpful allies.