Paul Ryan “thinks only he can help House Republicans maintain an independent brand if Trump is the nominee.” That’s what a Republican insider told me yesterday in an illuminating conversation about the GOP speaker’s announcement that he won’t accept his party’s presidential nomination.

In explaining the decision, the insider noted that Ryan had worked hard to win the trust of the fractious House GOP: He’s “holding” Republican unity in the House “together by a thread.” If Ryan’s colleagues thought he was making decisions as the speaker based on what would best serve a potential presidential bid, he’d lose the trust he has managed to build. What’s more, the insider argued, Ryan wants to stay speaker “to try to insulate House Republicans from massive losses this fall” if Donald Trump is the nominee. Ryan plans to do so by raising vast sums for his House colleagues’ reelection campaigns. And Ryan wants to “present another vision of the Republican Party”—one that differs starkly from that offered by Trump. If Ryan runs for president, the insider argued, no one else will be able to do that.

Of course, if Ryan did gain the nomination, he wouldn’t have to worry about insulating House Republicans from the consequences of a Trump candidacy. The insider said people close to Ryan differ as to how good his chances of claiming the nomination in Cleveland would be. But even if he did, he’d come away crippled. By claiming a nomination he hadn’t campaigned for, Ryan would alienate both Trump’s supporters and Ted Cruz’s, which is to say, most of the Republicans who participated in the primary process. It’s not just that many Trump, and perhaps Cruz, supporters wouldn’t turn out for Ryan in November. They’d loathe him. He’d become the personification of everything grassroots Republicans hate about their establishment.

Which is why Ryan is smart not to run. And why GOP elites are smart to get behind Cruz, as many are finally starting to do, even though it’s highly unlikely Cruz can beat Hillary Clinton. The Republican insider told me that internal GOP polls show Cruz with zero crossover appeal to Democrats and swing voters. And a massive national survey by the media and technology company Morning Consult shows that, were the general election held today, Cruz would win even fewer electoral college votes than Trump. Nevertheless, for GOP elites, nominating Cruz offers two advantages. First, he’d bring conservatives to the polls, which could help vulnerable Republicans running for Congress. Imperiled congressional Republicans might not be thrilled to have Cruz atop the ticket, but they could at least endorse him, something many might not do if the nominee were Trump.

Second, and more important, a Cruz defeat at the hands of Clinton this November leaves the GOP in a better position to rebuild than a Trump loss to Clinton does. By conventional standards, Trump isn’t all that conservative. That means, if Trump loses this fall, conservative purists can again make the argument they made after John McCain and Mitt Romney lost: The GOP needs to nominate a true believer. And they’ll have such a true believer waiting in the wings as the early front-runner in 2020: Ted Cruz. After all, losing the nomination to Trump would put Cruz in second place, and the GOP has a history of giving second-place finishers the nomination the next time around (Bob Dole, McCain, Romney). Plus, after building the best grassroots network of all the 2016 candidates, Cruz—who’ll be barely 50 years old in four years—would enter 2020 with a big organizational edge. Thus, the GOP would remain at the mercy of its extreme base.

By contrast, if Cruz wins the nomination and then loses badly to Clinton, his presidential ambitions are likely over. The GOP hasn’t nominated a candidate who previously won the nomination since Richard Nixon in 1968, and Cruz’s 2016 loss will likely be far bigger than Nixon’s in 1960. Moreover, a Cruz loss in November would undercut the right’s argument against choosing a more moderate nominee. To be sure, some grassroots conservatives would find a way to rationalize Cruz’s defeat and preserve their belief that a right-wing ideologue can win. But more pragmatic conservatives would be confirmed in their belief that the next GOP nominee must reach out to Millennials, Latinos, and single women, and offer more to working-class Americans than just less taxation and regulation. A Cruz general-election defeat would strengthen the “Reformicons” who are trying to reform the GOP in some of the ways New Democrats reformed their party in the late 1980s and early 1990s. A Trump general-election defeat, on the other hand, would leave them facing a formidable obstacle in 2020: Ted Cruz.

Today’s Republican Party is basically split three ways: There are pragmatic conservatives, who are willing to compromise ideologically in order to win; purist conservatives, who want to make the GOP stand on principle; and populist conservatives, who want to turn the party into a vehicle for insulating white Americans from economic globalization and cultural and racial change. If Cruz beats Trump but then loses to Clinton, groups two and three lose, too. And faction number one—the only faction with any plausible path for reviving the GOP—leaves 2016 with a shot at doing just that.