Speaker Paul RyanPaul RyanHouse markup of ObamaCare repeal bill up in the air Trump: House GOP's plan for border tax could create more jobs Conservatives to Congress: Get moving MORE (R-Wis.) on Thursday said congressional Republicans will work with Donald TrumpDonald TrumpPence takes victory lap at CPAC: ‘This is our time’ President Trump, immigrants are not 'bad dudes' Zuckerberg group donated to Trump transition MORE if he succeeds in winning the Republican presidential nomination.

“We’ll make it work if it happens,” Ryan said in an interview with CNBC’s John Harwood. “I’m going to defend our ideas as the Republican Party, but we’re going to have to work with whoever our nominee is.”

Ryan, who was the GOP's vice presidential nominee in 2012, addressed policy differences between Trump and Republicans in Congress, namely on what should be done with Medicare and Social Security. Trump has said the benefits in those programs should not be cut. 

“It’s not unreasonable for people who paid into a system for decades to expect to get their money’s worth — that’s not an 'entitlement,' that’s honoring a deal,” the front-running candidate wrote in his book “Time to Get Tough” in 2011.

But Ryan and other Republicans argue Medicare and Social Security need to be reformed before both programs become insolvent and ultimately bankrupt.

“I think for younger people like myself, they’re not going to be there for my generation when we retire,” Ryan said. “You have to change these benefits to prevent them from going bankrupt.” 

Those differences aside, the Speaker said he believes a Trump presidency would be less harmful than another Democrat succeeding President Obama.

“What we’re worried about is having more of the same, which is all these big problems that are facing our country that are piling up. They’re still fixable,” he said. “If we have another presidency like this presidency, then I really do worry that the best days will be behind us, and that’s the problem.”