The retirement of House Speaker Paul Ryan is a clear sign that major changes to Social Security and Medicare are dead — and perhaps the ability of Republicans to keep control of Congress midway through Donald Trump’s first term as president.

The 48-year-old Ryan said he will leave Congress at the end of 2018, less than three years after he became speaker. He said he’s accomplished most of his goals since his first election to the House two decades ago and that he doesn’t want to remain a “weekend dad” for his three teenage kids.

House Speaker Paul Ryan: This Year Will Be My Last

The Wisconsin congressman and former vice presidential candidate has achieved one of his biggest political aims: Reshaping the complicated U.S. tax code. Last December the Republican-led Congress lowered taxes for businesses and individuals in the most sweeping changes since 1986.

Yet Ryan fell well short of achieving his most cherished goal: Revamping U.S. entitlement programs — Social Security, Medicare and Medicaid — that absorb an increasingly large share of annual budgets.

Unless those programs are reformed, they could squeeze out federal spending in many other areas.

“More work needs to be done,” admitted Ryan, who acknowledged he’s spent more time working on entitlement reform than any other issue.

Also read:Paul Ryan puts optimistic spin on Republican prospects as he heads for exit

That work was not going to get anywhere under Trump. The president promised during the 2016 campaign that entitlement programs would be left alone. He’s shown no stomach since then for any changes that might stir up political opposition.

If Ryan had his way, opposition would be fierce.

His proposals would dramatically alter how entitlement programs operate by introducing more market mechanisms designed to raise competition and cut costs. Such vast changes would unsettle recipients and likely reduce how much the government spends on the elderly and the poor.

Democrats have already accused Republicans of cutting taxes for the rich and for big corporations at the expense of the middle class and poor. They’d have a field day if Republicans took up Ryan’s plans.

The twin objectives of Ryan, tax reform and entitlement reform, have always exposed an irreconcilable tension in his views. By cutting taxes, Washington has less financial room to modernize entitlement programs in a politically feasible way. The votes are not there, and they never have been, for sharply cutting Social Security or Medicare benefits.

By leaving Ryan won’t have to bear witness to a worsening fiscal picture that he not only helped to create, but that he’s helpless to rectify given the political realities of Washington. The nonpartisan Congressional Budget Office this week projected that budget deficits would top $1 trillion again by 2020 owing to recent tax cuts and higher federal spending.

“The Republican Congress and president do not seem to care about deficits or debt, and are not only failing to take steps to address the government’s poor fiscal situation but are taking steps likely to worsen it some,” wrote Yuval Levin, one of the foremost conservative budget experts, in an article in the conservative magazine National Review.

Getting out now also shields Ryan against the growing prospect that the Republicans will lose control of the House, Senate or even both branches in the 2018 midterm elections. Dozens of Republicans have already announced their retirements and party leaders worry about a “blue wave.”

Read:Paul Ryan puts optimistic spin on Republican prospects as he heads for exit

Although Ryan said it played no role in his decision, the veteran congressman knows that life in the House minority would render him virtually powerless and trigger calls for him inside his own party to step aside. He’d partly get blamed for an outcome that is largely the result of Trump’s unpopularity.

Once outside of Congress, Ryan would no longer have to defend Trump, either. The House speaker was often publicly critical of the president before he won the election and the two men couldn’t be more different.

The affable Ryan, an avid outdoorsman and health freak, grew up in a Midwestern household of modest means. He is a disciplined politician who’s always been seen as one of the Republican party’s leading thinkers. He never sought the speaker’s role and doesn’t enjoy much of what the job entails. And he’s well liked and respected in Washington — even his staunchest political foes have nothing bad to say about him personally.

True to form, Ryan had nothing bad to say about the president when he announced his retirement. “I’m grateful for the president for giving this opportunity to do big things,” he said.