After nearly a year of rumors and speculation, U.S. House Speaker Paul Ryan announced he won’t be running for re-election, retiring next January.

The 48-year-old Republican from Wisconsin was a respected voice on government finances, chairing the House Budget Committee and House Ways and Means Committee. In 2012, GOP presidential nominee Mitt Romney tapped him as his running mate. His biggest career accomplishment, of course, was becoming speaker in October 2015. House Republicans encouraged him to fill the seat after the resignation of his predecessor, John Boehner. He was the youngest speaker since James G. Blaine in 1875. Still, many wondered whether he had the fire in his belly for the job.

Mr. Ryan’s tenure started with great promise. A fiscal conservative in theory, he wanted to get the budgetary process under control and make the economy stronger. While he had ideological differences with his Democratic opponents, he didn’t believe in burning bridges — and tried to find ways to work together to get legislation passed.

But a lot has changed since he became speaker.

Most notably, President Trump’s propensity to trade blows with his adversaries has greatly intensified political polarization, making the speaker’s job harder.

On top of that, Messrs. Ryan and Trump had a strained working relationship. Mr. Ryan was reticent to even endorse the bombastic real-estate mogul’s run for office, given his divisive statements and promises to "drain the swamp" of Washington. Mr. Trump, in return, mulled the idea of supporting Mr. Ryan’s primary opponent in 2016. Mr. Trump called Speaker Ryan "disloyal" when he refused to pressure down-ticket congressional representatives to fully support the party’s presidential nominee.

After Mr. Trump’s unexpected election, the two reached a truce (of sorts), and found a path to working together. Mr. Ryan bit his tongue, remaining silent during some of Mr. Trump’s ugliest tweet storms. He could not enact much of the president’s agenda — efforts to replace Obamacare and fund a border wall both crashed and burned — though he did pass the Tax Cuts and Jobs Act last December.

But the pressure of dealing with such a politically incorrect man atop the GOP surely got to him.

On top of that, Mr. Ryan faced a rising rebellion from the conservative members of his caucus who believe that business as usual, such as the recently passed $1.3 trillion omnibus spending bill, threatens to bankrupt America.

There has been a growing concern in the middle class, which supplies Republican votes, that Washington politicians are more interested in keeping their lucrative political game going than in solving the nation’s problems. The election of such a flawed figure as Mr. Trump was a sign they were willing to try almost anything to change the status quo.

A version of this editorial first appeared in the Providence (R.I.) Journal.