Donald Trump speaks at Trump Tower, in New York, after his decisive victory in the Indiana primary. Ted Cruz has withdrawn from the race. PHOTOGRAPH BY VIEW PRESS / CORBIS VIA GETTY IMAGES

Despite the best efforts of the Never Trump movement, it has been clear for some time that Donald Trump is destined to be the Republican candidate for President in 2016. His sweeping victory in New York, a couple of weeks ago, confirmed his popularity among the white suburban voters who make up the key voting bloc in the G.O.P. And his decisive win in Indiana, on Tuesday, more or less settled things. Ted Cruz, in suspending his candidacy, was only accepting the inevitable.

I noted a couple of months ago that one of the big problems with the Never Trump movement was that it didn’t have a credible candidate. Once Marco Rubio flamed out, its only options were John Kasich, who had won but a single state (his own), and the stridently reactionary Cruz. Republican primary voters have their idiosyncrasies and prejudices, but in one respect they are just like other Americans. Presented with a choice of voting for Cruz or A.N. Other, a majority of them opted for the latter—a fact that played greatly to Trump’s advantage.

Still, even Trump appeared to be surprised by his sixteen-point margin of victory in the Hoosier State. In a speech at Trump Tower, Trump said that he hadn’t expected Cruz to drop out just yet. The Texas senator’s decision occasioned a rhetorical flip-flop on Trump’s part. Earlier in the day he had suggested that Cruz’s father, Rafael, who is now an evangelical preacher, had aided and abetted Lee Harvey Oswald, a claim arising from an article that had appeared in the National Enquirer. In his speech, Trump now paid tribute to Cruz’s “whole beautiful family.”

It has been evident ever since Trump announced his candidacy, eleven months ago, that there was virtually nothing he wouldn’t say to tar his rivals or anyone else who dared to challenge him. This is the candidate who referred to Rick Perry as a dimwit; criticized Carly Fiorina’s appearance; claimed that John McCain wasn’t a war hero; appeared to suggest, during an interview on CNN, that Megyn Kelly was menstruating; and compared Ben Carson to a child molester.* Ultimately, none of these statements did much damage to Trump’s campaign. Arguably, they enhanced it.

Historians and political scientists will be debating for decades how Trump got to this point, but any convincing explanation must acknowledge his talents as a demagogue and pugilist. Speaking on CNN last night, David Axelrod, one of the many commentators who initially dismissed Trump’s candidacy, said, “He’s proven himself to be very resourceful and very skilled.” Axelrod pointed, in particular, to Trump’s mastery of television and social media. On Fox, Rich Lowry, the editor of National Review, which has been in the vanguard of the Never Trump movement, said, “I have to tip my hat to what Trump has achieved.” Citing the fact that Trump didn’t have any pollsters or, until recently, any political organization to speak of, Lowry added, “It is completely incredible.”

That it is. But there are two factors in Trump’s rise that help to account for it: the febrile environment he has been operating in, and the potency of his message.

If Republican voters hadn’t been so disillusioned by their usual leaders, Trump would have remained a fringe candidate. Instead, aided by some prominent right-wing media figures, such as Rush Limbaugh, Ann Coulter, and Sean Hannity, the New York businessman was able to present himself as the heir to the Tea Party revolution, which many activists felt had been quashed or betrayed. He was also able to tap into many Republicans’ anger, some of it tinged with racism, about President Obama and his policies; into broader fears of terrorism and economic decline; and into a general disgust with professional politicians, some of which was brought about by the G.O.P.’s own obstructionism.

Contented countries don’t produce politicians like Trump. For many years now, a majority of Americans have told pollsters that they believe the nation is on the wrong track. A decade and a half marked by foreign wars, terrorist threats, recession, slow growth, political gridlock, culture wars, and (for many voters) declining incomes have further undermined faith in the political system, creating space for insurgent candidates like Trump and Bernie Sanders.

Of course, if you are going to run as a populist outsider, you need a message that fires up voters. It was here that Trump’s instinctive grasp of the darker reaches of the Republican psyche came to the fore. Having spent years listening to talk radio, he knew that the issue of illegal immigration divided the grassroots of the Party from its leadership in Washington. In promising to deport millions of undocumented workers and build a wall across the southern border, he established his conservative bone fides and differentiated himself from the other candidates.

In responding to fears of terrorism, Trump made a similar calculation. When he called for a ban on Muslims entering the United States and a registry system for Muslims who already live here, he must have known that the media and most of his Republican rivals would react with outrage. But Trump perhaps sensed that his illiberal proposals would prove popular with ordinary G.O.P. voters, and he turned out to be right, especially after the gun massacre in San Bernardino, California, in December.

Finally, Trump ignored some Republican economic orthodoxy, which, for decades, had been promulgated by free-market economists, rich donors, and corporate-funded think tanks. On Social Security, long a target of conservative reformers, he came out against cuts in benefits or a rise in the retirement age. On taxes, he took a standard Republican line, releasing a reform plan that would bestow huge gains on wealthy households, but he hasn’t talked about it very much. Instead, he has promised to rebuild the nation’s crumbling infrastructure—such as roads, airports, schools, and hospitals—saying that much of what we have got is “Third World.” His pledge to rebuild isn’t very credible—he doesn’t say where the money would come from—but it aligns him more closely with Democrats than with many Republicans.

Trump's biggest heresy was to abandon free trade. Claiming that NAFTA and other trade agreements have cost countless jobs, he threatened to impose hefty tariffs on countries such as China, which export a lot of cheap goods to the United States. In his speech last night, Trump made clear that he will try to use this line of attack against Hillary Clinton. “She doesn’t understand trade,” he said, adding that NAFTA, which her husband signed, was “perhaps the single worst trade deal in history.” But it isn’t just previous Democratic and Republican Administrations that Trump has challenged. He has also criticized American corporations for shifting jobs to foreign countries, and has threatened to punish them. “We’re going to bring back our jobs, and we are going to save our jobs,” he said at Trump Tower. If U.S. companies insist on moving them overseas, he went on, “there will be consequences, and there will be very serious consequences.”

As with his tax and spending promises, Trump’s tough talk on trade and offshoring doesn’t withstand close inspection. (How would he bring the jobs back?) It does, however, give him something to say to Republican voters who have seen factories close down, jobs lost, and wages stagnate. And it further distinguishes him from other Republican politicians.

And that, in the end, is Trump’s greatest strength. Despite having demonstrated political cunning in the course of dispatching his sixteen rivals, he has managed to convince many Republican voters that he isn’t a politician at all.

*This sentence has been updated to clarify the timing of Donald Trump's comment about Megyn Kelly.