WASHINGTON — Ending weeks of reluctance to embrace his party’s presumptive nominee, Speaker Paul D. Ryan endorsed Donald J. Trump for president on Thursday in a modest but unequivocal backing of a candidate whose views Mr. Ryan has frequently condemned.

In a column in his hometown newspaper in Janesville, Wis., Mr. Ryan said that recent conversations with Mr. Trump had convinced him that the billionaire developer will help advance the conservative agenda that the speaker is trying to introduce.

“Through these conversations, I feel confident he would help us turn the ideas in this agenda into laws to help improve people’s lives,” said Mr. Ryan, who is also chairman of the Republican National Convention that will nominate Mr. Trump. “That’s why I’ll be voting for him this fall.”

The endorsement is the latest and most consequential example of leading Republicans falling in line behind Mr. Trump. Mr. Ryan faced substantial pressure from fellow Republicans in Congress, many of whom share Mr. Ryan’s misgivings about Mr. Trump, because they realize that high-level public divisiveness over his candidacy only weakens Mr. Trump and increases the political risks of defending their majorities in the House and Senate.