WASHINGTON — Paul D. Ryan took the helm of the House two and a half years ago, not because he wanted it, but because he was seen as the only lawmaker who could keep Republicans from devouring themselves. They had shut down the government, nearly precipitated a debt crisis and toppled a speaker, John A. Boehner.

Mr. Ryan announced his departure on Wednesday with the gaps in the party as evident as ever, but drawn along new fault lines, with nativists and populists following the lead of President Trump, pitted against what remains of Mr. Ryan’s brand of traditional conservatism.

The speaker, who once dreamed of a more inclusive party, open to black, Latino and immigrant voters enticed by a youthful, optimistic vision, was being left behind.

“I think he’s tired,” said Newt Gingrich, who was driven from his own speakership in 1998. “It’s a combination of dealing with 240 House Republicans, the United States Senate and President Trump. That trio was about enough.”