Ryan beat businessman Paul Nehlen in Tuesday's Wisconsin primary. Nehlen had been courting Trump supporters and won praise from the Republican presidential nominee last week. But Trump endorsed Ryan days later.
"I'm humbled and honored that Wisconsinites in the 1st Congressional District support my efforts to keep fighting on their behalf," Ryan said in a statement to the Associated Press. Ryan said he and his wife, Janna, were grateful and thankful for the support.
Ryan had largely ignored Nehlen in what had been a sleepy primary before Trump thanked Nehlen on Twitter for his comments defending Trump. Nehlen won the backing of some prominent conservative figures, including former Alaska Gov. Sarah Palin, but it wasn't enough to overcome Ryan's popularity in his southeastern Wisconsin district.
Ryan was first elected in 1998 and this is his first re-election win since becoming speaker last fall.
He went into the primary with massive advantages in name recognition and money. Ryan had out-raised the unknown Nehlen by a 17 to 1 ratio through the latest reporting period, and was largely ignoring his opponent and was expected to win easily.
Trump changed all that the week before the primary, when he tweeted thanks to Nehlen for support while Trump was being vilified for remarks about the Muslim American parents of a U.S. soldier slain in Iraq. Trump also said he wasn't ready to endorse Ryan, who had joined in that criticism.
Trump shifted course a few days later under heavy pressure from Republican leadership, but by then Nehlen had gotten a burst of national publicity.
On Tuesday night, the tension between the GOP presidential nominee and the House Speak remained evident.
Speaking to reporters after his primary victory, Ryan said he hoped Trump would make clear that he didn't intend to incite violence when he said earlier in the day that "Second Amendment people" would know how to block Democratic nominee Hillary Clinton's attempt to undermine gun rights if she were president.
"It sounds just like a joke gone bad," Ryan said. "I hope he clears it up very quickly."
Ryan also thanked Wisconsin voters for supporting his brand of conservatism, drawing a contrast with Mr. Trump's more inflammatory style, without saying the nominee's name.
"They share my desire for political leadership that is inclusive, not divisive," Ryan told reporters. "It's simple to prey on people's fears. That stuff sells, but it doesn't stick.It doesn't last. Most of all, it doesn't work."
Ryan had responded to Nehlen's unexpected spell in the limelight with a blitz of radio appearances and he added a pair of campaign stops the day before the election, determined to avoid the fate that befell House Majority Leader Eric Cantor, when the Virginia Republican lost a primary to a little-known tea party challenger.
Ryan had other advantages, including widespread popularity in the district where he was first elected in 1998. Ryan had also worked hard to maintain those home ties, traveling back to Janesville as much as possible to be with his wife and three children.
Nehlen, an executive at a water filtration company, first made a splash with a web video of him riding a Harley-Davidson motorcycle, showing his tattooed arms. He challenged Ryan to an arm-wrestling match if he wouldn't debate him.
He ran well to Ryan's right, accusing Ryan of betraying Trump and favoring a "globalist agenda" of disastrous trade deals and porous borders. Nehlen attracted support from Sarah Palin and conservative provocateur Ann Coulter, with the latter appearing alongside Nehlen in the district the weekend before the election.
- Reuters contributed to this report.