JANESVILLE, Wis. — House Speaker Paul Ryan endorsed Donald Trump’s bid for president on Thursday, bringing an end to the extraordinary public split between the GOP’s presumptive White House nominee and the nation’s top Republican in office.

“I had friends wishing I wouldn’t support him. I had friends wishing I would,” Ryan said in an exclusive interview with The Associated Press. “I really didn’t feel any pressure, other than my goal is to make sure that we’re unified so that we’re at full strength in the fall so we can win the election.”

Ryan’s announcement, made in a newspaper column published in his Wisconsin hometown, marks a significant step for a Republican Party trying to come together ahead of a general election matchup against likely Democratic nominee Hillary Clinton.

And Ryan made clear he had Clinton on his mind when he decided to join the ranks of Republicans who have slowly come around to backing Trump, the brash billionaire few expected to emerge as the party’s nominee when the campaign began in earnest last year.

“This to me is about saving the country and preventing a third progressive, liberal term, which is what a Clinton presidency would do,” Ryan said.

Trump celebrated the endorsement on his favorite venue, Twitter.

“So great to have the endorsement and support of Paul Ryan,” Trump wrote. “We will both be working very hard to Make America Great Again!”

On Thursday evening, Trump made no mention of Ryan during a rally in San Jose, California.

There are still some GOP leaders who say they won’t support Trump, including 2012 Republican presidential nominee Mitt Romney, who tapped Ryan as his running mate four years ago. A day earlier, Romney signaled that he would support a possible third-party candidate instead of the presumptive Republican nominee.

Ryan himself acknowledged that he continues to have concerns about Trump’s combative style, but he said after a series of conversations with Trump, he’s confident he and the House Republicans he leads as speaker will be able to work with him as president on their agenda.

“We obviously have a different kind of style and tone. That’s very clear. Anyone who knows anything about us knows that,” Ryan said. “But what really, ultimately matters is how best can we make sure these principles and policies get enacted in 2017.”

As the GOP’s so-called “Never Trump” movement struggled to identify a viable alternative, many believed it was only a matter of time before Ryan fell in line. He said the endorsement was not the product of any deal with the billionaire developer, but a decision based on “an understanding of our mutually agreed upon principles.”

Ryan said he specifically wanted to go over Trump’s approach to executive power, judicial appointments and his position on abortion.

“Those conversations took some time,” he said.

“I feel much more comfortable that he’s in the same page with us,” he added. “Most importantly, it is obvious that Hillary Clinton is not.”

Ryan ended a weekslong standoff with Trump minutes before the interview by outlining his support for the New York billionaire in a column published online by The Janesville Gazette.

He had shocked the political world last month by refusing to endorse Trump once the real estate mogul became the last major Republican presidential contender still in the race.

The pair spoke privately in a series of Washington meetings last month, and their staffs’ stayed in touch. Ryan said he made the decision to formally endorse Trump earlier in the week.

“I wasn’t just going to sign up sight unseen without even having a conversation or knowing what direction, because he had only mentioned a few policies in the primary,” Ryan said. “I wanted to basically make sure that [we agreed] on the big issues of the day, on really important principles.”

Major differences remain, however. And conservative leaders across the country continue to have deep reservations about Trump’s devotion to Republican principles and his temperament.

In particular, Ryan has embraced major changes to Medicare and Social Security as his signature issue on Capitol Hill. Most Republicans in Congress have followed Ryan’s plan to reduce the cost of the popular programs that are contributing to the national debt.

Trump has repeatedly promised not to touch the popular programs, echoing a position more commonly adopted by Democrats.

The two also break on immigration. Trump wants to deport more than 11 million immigrants in the country illegally in addition to imposing a temporary ban on Muslims from entering the U.S.

Ryan opposes both policies.

“It’s no secret that he and I have our differences. I won’t pretend otherwise,” Ryan wrote in The Janesville Gazette column. “And when I feel the need to, I’ll continue to speak my mind.”

Ryan’s announcement was released as Clinton was delivering a foreign policy speech excoriating Trump’s approach.

Electing Trump, she said, would be “a historic mistake.”

Peoples reported from Washington.