House Speaker Paul Ryan easily defeated his primary challenger Tuesday night, putting to rest concerns that he was in electoral danger after Donald Trump's involvement in the race.

The race was called about half an hour after polls closed in Wisconsin. At that point, Ryan led challenger Paul Nehlen by 56 points, 78 percent to 22 percent (with just under half of precincts reporting).

Until recently, Ryan had little reason to assume he would have any trouble against Nehlen: no House Speaker in recent history has lost his or her respective primary, and Ryan is popular in his district. After representing the seat for almost 20 years, he's had a primary challenger just twice: in 2014, when he won 94 percent of the vote, and in 1998, his first race, when he won 81 percent of the vote.

Get Breaking News Delivered to Your Inbox

But then Donald Trump got involved. The Republican nominee tweeted his thanks at Nehlen, a vocal Trump backer, and initially refused to endorse Ryan in his primary, saying he was "just not quite there yet."

After pressure from national Republican leaders -- and after his running mate, Indiana Gov. Mike Pence, broke with Trump to back Ryan--Trump came around last Friday and announced he was supporting Ryan. Still, for the little-known Nehlen, the entire dust-up was a source of precious media attention and name ID-boosting headlines.

And given the recent fate of a fellow GOP House leadership, Ryan had reason to at least to take the challenge seriously: just two years ago, House Majority Leader Eric Cantor fell to a little-known primary challenger in what became one of the biggest House race upsets in recent history.