House Speaker Paul D. Ryan (R-Wis.) ended a month-long holdout by formally backing his party’s presumptive presidential nominee: Donald Trump.

On Thursday, the speaker penned a guest column for his hometown newspaper in which he trumpeted the controversial real-estate mogul as someone who could support the speaker’s conservative agenda. The move consolidated Trump’s backing from Republican congressional leaders and most party leaders, leaving a small-but-influential bloc of conservatives who have vowed to never support the real-estate mogul isolated and without a significant leader carrying their flag.

Like many senior Republicans, Ryan’s endorsement came with its share of caveats about the speaker and the presumptive nominee’s remaining policy differences. It did not signal any level of comfort with Trump’s sometimes bombastic style compared to the Midwestern values the speaker tries to embody. Instead, Ryan’s decision came down most squarely to attempting to prevent another Democrat from claiming the Oval Office.

“It’s a question of how to move ahead on the ideas that I—and my House colleagues—have invested so much in through the years. It’s not just a choice of two people, but of two visions for America,” Ryan wrote, citing the “bold” policy agenda that he will begin rolling out next week and contrasting that with Democratic front-runner Hillary Clinton’s platform.

“Donald Trump can help us make it a reality,” Ryan said.

The move marks a big about-face for Ryan, who four weeks ago declared he was “not there yet” in terms of endorsing Trump and questioned whether the controversial businessman was even a conservative. According to Ryan’s team of advisers, the speaker made the decision to support Trump earlier this week — and by late Wednesday, his senior staff began working on the op-ed for the Gazette in Janesville, Wis.

Trump responded to the announcement on Twitter:

Ryan and Trump met once in person in mid-May when the billionaire crisscrossed Capitol Hill for meetings with House and Senate leaders. The speaker’s advisers said they spoke by phone several other times, with the last call coming last week. Senior Ryan advisers have also remained in close contact with Trump’s campaign chairman, Paul Manafort, a Republican lobbyist with longtime ties to influential GOP leaders.

Throughout the talks, neither side agreed to switch any of their policy positions, Ryan’s advisers said, and one aide suggested that Thursday’s endorsement should not be construed as the sort of “real unification” of Republicans that Ryan has called for repeatedly since first announcing he was not ready to endorse Trump.

Indeed, it’s still not clear if Ryan will ever campaign side-by-side with Trump — his focus remains on helping elect House Republicans. And at the moment, Ryan still has no formal speaking role at the Republican National Convention in Cleveland in late July, beyond his job as convention chairman, which has been a largely honorific role in recent years.

But Ryan’s move may also signal that the speaker and other top Republicans are worried about keeping the House and Senate in Republican hands come November, and believe the best way to do that is to unite the party.

Senate Majority Leader Mitch McConnell (R-Ky.) was among the first top leader to say he would back Trump.

With his support, Ryan became the last senior Republican congressional leader to throw his weight behind Trump’s candidacy. While the speaker did not use the word “endorse,” he tweeted that he would vote for his party’s nominee in November.

And Ryan’s chief communications adviser, Brendan Buck, said reporters need not mince words to figure out what it all meant.

His decision may also surprise some of his closest associates, one of whom said as early as this week that Ryan and Trump could not be more different.

“Paul Ryan in many ways is the antithesis of Donald Trump; he’s everything that Donald Trump is not. He’s a decent human being. He is a conservative. He is steeped in public policy. He cares about ideas. He’s a person who conducts himself with civility and grace in public life. He doesn’t put down his opponents,” said Peter Wehner, a former policy aide to President George W. Bush and a personal and ideological compatriot of Ryan’s for two decades.

Ryan’s column in his local newspaper left no doubt where he stood after speaking “at great length” with Trump since he initially declared hesitation about his candidacy.

“Through these conversations, I feel confident he would help us turn the ideas in this agenda into laws to help improve people’s lives. That’s why I’ll be voting for him this fall,” Ryan wrote.

Democrats pounced on the news, and stressed their campaign strategy of tying Republican congressional candidates to Trump, who they argue is fatally unpopular with Latinos and women, among other important constituencies.

“House Republicans will be inseparably tied to their toxic front-runner in November, case closed,” said Democratic Congressional Campaign spokeswoman Meredith Kelly. “Ryan’s dragged out decision underscores how truly vulnerable Donald Trump makes House Republicans in swing districts, but ultimately Ryan has only caused them further damage.”

Initially, the speaker, who likes to call himself a “policy guy” and a “movement conservative,” was at odds with Trump’s positions on key policy planks dear to mainstream Republicans of the past 40 years, including a free trade agenda and the effort to rein in federal spending on entitlements.

Those issues were the hallmark of Ryan’s early congressional career and Trump stands squarely against them. Additionally, Trump’s proposals to ban all Muslim travel into the United States and the candidate’s brusque comments regarding minorities, women and the disabled gave Ryan pause.

Those concerns appear to remain, and Ryan vowed to speak out against Trump if he crosses lines again.

“It’s no secret that he and I have our differences. I won’t pretend otherwise. And when I feel the need to, I’ll continue to speak my mind. But the reality is, on the issues that make up our agenda, we have more common ground than disagreement,” he wrote.

What Donald Trump is doing on the campaign trail

U.S. Republican presidential nominee Donald Trump speaks at a campaign event at Trump Doral golf course in Miami, Florida, U.S. July 27, 2016. REUTERS/Carlo Allegri (Carlo Allegri/Reuters)

Mike DeBonis and Kelsey Snell contributed to this report.