House Speaker Paul Ryan announced he is on his way out — and he’s defending Donald Trump’s presidency until the bitter end.

Ryan told reporters Wednesday morning that he will not run for reelection this November, following a standard framework: He wants to see his kids more, and be a present husband. But his final remarks at the press conference were perhaps the most poignant. Asked if Trump’s reshaping of the Republican Party played a role in his decision, Ryan said, “Not at all.”

“I’m grateful for the president for giving us this opportunity to get the country on the right track,” he said. “The fact that he gave us the ability to get this stuff done makes me proud of the accomplishments that I’ve been a contributor to. It makes me satisfied that I’ve made a big difference and he’s given us that chance, and I’m grateful to him for that, and that’s really how I see it.”

His defense of Trump in itself is not particularly surprising: Ryan is a party man. But it’s also a perfect articulation of a calculation — or perhaps miscalculation — Republicans made with Trump.

In the past 15 months, Ryan has transformed from a man who once held a moral high ground over Trump, denouncing his comments as “racist” and “unacceptable,” to one who has excused Trump’s behavior as that of a political neophyte’s. He’s downplayed investigations into Trump’s campaign and presidency and excused Trump’s racism, xenophobia, and misconduct. He’s watched Trump abandon conservative beliefs on trade and immigration and has been forced to spin the president’s often politically incoherent ideas.

And still, Ryan says two words made Trump’s presidency worth it: tax cuts.

Ryan got behind Trump to push his own agenda

Ryan has never had much of a close personal relationship with Trump. The two have a working rapport, but Trump reportedly finds Ryan dry, and he’s dubbed him the “boy scout,” sources told Politico. The dynamics of their relationship was established early.

When Ryan endorsed Trump as the Republican nominee, he was endorsing his own agenda.

“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 in an op-ed in his hometown paper the Janesville Gazette, endorsing Trump in 2016.

And at the start of Trump’s presidency, congressional Republicans, with control of both chambers of Congress and the White House, set forward an ambitious agenda. They would repeal and replace Obamacare in mere months, pass a major budget deal, and enact massive tax cuts.

Now, with Congress unlikely to accomplish much else this year, Ryan said he is leaving proud of having done two of those things.

“Probably the two biggest achievements for me are, first, the major reform of our tax code for the first time in 36 years, which has already been a huge success for this country, and that’s something I’ve been working on in my entire adult life,” Ryan told reporters of the $1.5 trillion tax cut Republicans passed at the end of the 2017 — a law that has widely been panned as a boon for corporations and the ultrawealthy.

“Something I’ve focused on since becoming speaker is to rebuild our nation’s military, and after addressing our military readiness crisis, that was a top priority we got done last year as well,” Ryan cited of his second accomplishment, referring to a $1.3 trillion spending bill that put military funding at historic levels and will keep the government open through September.

To be sure, this is a very narrow and rosy read of a year that has been made of a lot more politics and scandal than policy.

Ryan’s job was hard. Trump made it near impossible.

Ryan’s bet on Trump — as a vehicle to push major conservative reforms — was one many Republicans made.

In many ways, conservatives have made substantial gains in the past year through the White House’s deregulatory push and a wave of conservative judicial nominees.

But they also made a calculation that underestimated Trump — his volatility, the stakes of his willingness to speak his mind, his inexperience in office.

After months of highly visible party infighting, Obamacare repeal failed epically — in large part due to a lack of clarity from the White House. Republicans spent most days excusing Trump’s tweets and White House scandals. And while Republicans managed to pass tax cuts, lawmakers are already worried the bill won’t be popular enough in November to help them win elections. This week, the Congressional Budget Office reported the tax bill will contribute more than $1.5 trillion to the deficit. Paired with the spending bill, the deficit spending will increase by $11.7 trillion over the next 10 years.

Ryan says he is proud of the tax cuts and rebuilding the military. But Trump, who doesn’t seem very interested in either, is stuck on a heated investigation into his campaign and pushing policy that only deepens party divides, from gun control and trade to immigration reform.

In Washington, Ryan has long established himself as a conservative ideologue with a clear agenda. Trump couldn’t care less.