Notably, Mr. Cruz also won among those who did not call themselves born-again Christians — a group with which he has struggled in earlier contests.

Voters who made their decisions late once again broke sharply against Mr. Trump, who sustained a series of self-inflicted wounds in the last week: A third of voters settled on a candidate over that period, and of those, 46 percent said they backed Mr. Cruz. Only 29 percent embraced Mr. Trump.

Most striking was how many Wisconsin primary voters still harbored deep discomfort with Mr. Trump despite his wide lead in the race for delegates. In exit polls, 58 percent said they would be “concerned” or “scared” if he were elected, higher than the other two Republican hopefuls. And 37 percent of those who voted in the Republican primary said they would support Hillary Clinton, a third-party candidate or no one at all if Mr. Trump were the nominee.

Wisconsin was not a total loss for Mr. Trump, however: He picked up three of the state’s 42 delegates, and had a chance to win a handful more depending on the results in a congressional district stretching across much of the western end of the state.

On Tuesday night, as Mr. Cruz quoted John F. Kennedy and Winston Churchill and offered himself as a unifier of a party at war with itself, his two rivals refrained from appearing in public. The silence was especially noticeable from Mr. Trump, who has often used primary nights to boast of his strength, joust with reporters or promote his business interests.

Long after the outcome was clear, a Trump spokeswoman, Hope Hicks, issued a statement assailing “Lyin’ Ted” and calling Mr. Cruz “worse than a puppet — he is a Trojan horse, being used by the party bosses attempting to steal the nomination from Mr. Trump.”