Max Taylor Photography

Paul Ryan and Donald Trump often seem like they’re living in alternate political worlds. The House speaker is constantly asked to weigh in on the latest insult or unusual policy proposal from the Republican nominee. Trump, in turn, shows little interest in the ideas or mild-mannered approach of the top-ranking House Republican. It’s difficult to see how they would find common ground if Trump wins the White House. But Ryan, at least, insists they’ll find it.

The House speaker pledged to “work with whoever wins whatever office” on Thursday at the Washington Ideas Forum, presented by The Atlantic and the Aspen Institute. He emphasized, though, that he believes Congress itself would be more productive with a Republican in the White House and the GOP leading the legislative branch. “I’m tired of divided government, it doesn’t work very well,” he lamented in an interview with Ron Brownstein. “The big things—poverty, debt crisis, the economy, health care—these things are stuck in divided government. That’s why we think a unified Republican government is the way to go.”

A Trump victory, which had long seemed like an improbable hypothetical, looks increasingly possible. Hillary Clinton maintains a lead of roughly 3 percentage points in national polling averages, a slight increase compared with her standing prior to the first presidential debate. But her lead had already eroded significantly in the weeks leading up to that contest, provoking anxiety among Democrats and cautious optimism among Republicans worried that a landslide Democratic victory would have devastating effects for conservatives in close races across the country.

If Trump wins the White House and Ryan keeps his job, the two would presumably work together, but Ryan on Thursday sounded reluctant to endorse elements of Trump’s agenda that deviate from conservative orthodoxy. Ryan didn’t “want to get into hypotheticals” when asked if he would help Trump achieve his stated aim of renegotiating—or, absent that, withdrawing from—the North American Free Trade Agreement. He eventually conceded that “there are things we can do to upgrade and improve” the deal. When Ryan was asked if he would help Trump pass a $550 billion infrastructure bill, an amount the GOP nominee has indicated he wants to see spent, the crowd broke into laughter. “That’s not in the ‘Better Way’ agenda,” Ryan quipped.

The Better Way agenda is the speaker’s aspirationally titled policy plan for his party. He touted its specs on Thursday, highlighting the importance of a conservative agenda aimed at tackling poverty and pursuing tax and health-care reform. The plan is part of Ryan’s attempt to offer an alternative, softer-around-the-edges brand of conservatism that contrasts with Trump’s brash political style and nonconformist policy prescriptions. It’s not an easy task. The more the Republican nominee deviates from the standard GOP script, the louder the House speaker needs to be if he wants to act as a counterweight. But the more negative publicity Trump generates, the harder it is for Ryan to promote his own vision without being dragged off-topic by his party’s presidential nominee.

Ryan has attempted to strike a balance between supporting and avoiding Trump, a strategy that comes across as strange and confusing at times. He has endorsed Trump, but has repeatedly spoken out against him. Lately, Ryan seems to be trying to avoid criticism. He declined to weigh in on Trump’s insults aimed at former Miss Universe Alicia Machado after the debate, despite his willingness to previously denounce Trump’s comments on Judge Gonzalo Curiel, and express support for Khizr Khan, after both became Trump’s targets. It might help the House speaker build goodwill with pro-Trump party leaders if he refrains from reprimands, but it also indicates that Ryan, who’s styled himself as a principled conservative, bows to political pressure just like other politicians.

If Trump loses badly in November, Ryan’s agenda may gain more prominence and support party-wide as a way to rebuild. But the ideas that Trump has put forward, and the resonance they have had with the conservative base, won’t simply disappear.

When the topic of immigration reform came up during the conversation Thursday, Ryan echoed, to some extent, Trump’s calls to protect the border. “You’ve got to start with security,” he said. “The problem so many people have is there is no faith or confidence that we’ll actually secure our border.” But, Ryan added: “I think there is a way to deal with the undocumented population that doesn’t involve mass deportation, that doesn’t involve an amnesty, that gets a person a way to earn their right to a work permit.” Still, he conceded that “what I don’t think works is a big, comprehensive bill.”

For all his promises of compromise, it wouldn’t be easy for the House speaker to work with either Clinton or Trump. If Clinton wins, Ryan could face at least four more years of the opposing party in the White House. If Trump wins, Ryan may have to decide how much to stand in opposition to the man who’s upended his party, and how much he is willing to, as Trump might put it, make a deal.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.