We are about to watch something unfold that is really fascinating and very rare in American politics. One of our two major parties—I’ll let you guess which one!—is on the cusp of having to weigh what is good for its congressional wing in the short term versus what is good for its aspirations to reclaim the presidency over the long term. I’m not sure this has any precedent, at least in the modern history of the republic: a party that, electorally, demographically, and culturally, has so insulated and isolated itself from the rest of the nation that what’s good for its legislators is bad for the party’s future—not to mention the rest of the country.

I’m writing of course about immigration and, of course, about the Republican Party. We are nearing, now, the push-comes-to-shove moment; we’re about to see whether this bill can pass. You will remember back to last November and December, when nearly everyone (except me) agreed that while there may be no grand bargain or comprehensive tax reform or gun-control legislation in the offing, surely immigration was a slam dunk. The GOP had learned the hard way that it simply couldn’t go on as it has been. The party would never win another presidential election, etc.

So now we approach the midnight hour, and what is going on? Passage is hardly a slam dunk. It’s more like a 25-foot 3-pointer with a defender’s hand in the face. And the problem sure ain’t the Democrats. In the Senate, Republicans are skittish about border security (among other issues, but mainly border security). The Republicans who want stricter border-security measures and a say in how to create them have a point; I can understand that their constituents are demanding this, so Democrats should be willing to bargain here. On the other hand, there’s something illogical at the heart of the border-security argument. Unless the border is secure, the 11 million will have to wait, and wait, for the path to citizenship to kick in. Why hold people who are already here hostage to border-security demands? It’s sort of like saying current pot offenders can’t get out of jail until the marijuana trade is eradicated.

That’s why it’s not really about border security—border security is the only leverage Republicans have to slow down the path to citizenship, which ultimately is the issue here for the right-wing base and always has been. The vast majority of individual GOP House members, and a smaller majority of the party’s senators, know that voting for immigration reform with said path is risky for them politically. At the very least, it’s something they’ll have to explain at angry town-hall meetings. In the more serious cases, it will invite a primary challenge from the right.

And thus we have it: something that would obviously be good for their party in the long run, supporting reform so that they can start the process of appealing to Latino voters, is dangerous in the short run. Now you might be thinking here that, gee, this is a bad spot of luck for them. Please, don’t. This is not some freak accident, but is the product of design—of the kinds of ideologically homogenous districts Republicans have drawn for themselves and, more broadly, the way a snow-white party has culturally divorced itself from the racially heterogeneous America the rest of live in and celebrate.

So the party’s current legislative power and its potential presidential power are in direct conflict. And this is John Boehner’s choice, if the bill gets through the Senate: will he defy his caucus’ here-and-now wishes in order to advance his party’s future presidential prospects? Speakers answer to their members, so I can’t think of any precedent for a speaker doing this. But then again, it’s probably never come up in such stark relief, because no congressional party has ever operated out of a little ideological cocoon the way this one does. A president has to appeal to voters in the middle, but these people only have to appeal to voters who are exactly where they are and even further to their right. And they can win reelection pretty much forever on that basis.

Boehner told reporters Tuesday morning, “I don’t see any way of bringing an immigration bill to the floor that doesn’t have a majority support of Republicans.” If that’s really the case, then this is over. It doesn’t have anything close to a majority. But there’s a lot of guessing among insiders that it might not really be the case—that operatives like Karl Rove, and the party’s money people who are obsessed with winning back the presidency, might get to him and persuade him to break the Hastert rule (which was never meant to be a “rule,” by the way) and let a vote happen. If he does, he’s probably serving his last term as speaker. If he doesn’t, his party will find itself in a raging battle with demographic destiny. And its only future path to the White House will lie in stoking white resentment to fever levels to produce the highest turnout possible, while dividing the country even further—but solidifying the cultural idea of “the party,” which is what really matters most to them.