Donald Trump is going to win the Republican nomination.

If you’d told me a year ago that Trump would be the nominee, I’d have thought you were nuts. Don’t just take my word for it: Read what I wrote about Trump in July or August or even in November. Those pieces variously treated Trump’s nomination as being somewhere between improbable and extremely unlikely. You can also read pieces from October, December or January that were less skeptical of Trump’s chances and show how our opinion of him evolved over time. Still, other than being early skeptics of Jeb Bush, we basically got the Republican race wrong.

It’s at this point that I’ll spare you the navel-gazing detours about empirical philosophy since Trump’s nomination is potentially such a consequential event for both the Republican Party and the Republic. Trump is a huge departure from the conservative movement as embodied by Ronald Reagan — and also a probable (although by no means certain) general election loser in what would otherwise be a highly winnable race for Republicans. Usually a party picks a nominee who is both reasonably “electable” and who upholds its traditional policy positions. In Trump, the Republican Party may have a candidate who fails on both counts.

For a candidate like Trump to win the nomination, it means that several things have gone wrong — both for the Republican Party and in the assumptions we made about how party nominations work. The other day, I summed up the three most important such factors as follows:

Updated post-Trump priors:

1. Voters are more tribal than I thought.

2. GOP is weaker than I thought.

3. Media is worse than I thought. — Nate Silver (@NateSilver538) May 1, 2016

To take the last one first, it’s irresponsible to reflect on Trump’s candidacy without considering the unprecedented way in which he dominated media coverage from the beginning of his campaign, which was worth the equivalent of $2 billion in paid advertising. Any time a demagogic candidate wins a nomination, it suggests a potential failure of political institutions, including (but not limited to) the media. This is something I’ve written about a lot from the earliest points of the campaign, so we’ll move along for now.

I’ve also spent a lot of time writing about the failings of the Republican Party as an institution. To some extent, these problems ought to have been foreseeable, and some empirically minded scholars like Norman Ornstein foresaw them. The Republican Party had a lot of near-disasters in recent years over matters including the debt ceiling and the selection of a new House speaker; furthermore, it had some actual disasters in the form of Senate, House and gubernatorial primaries that left the party with “unelectable” candidates. This raised the likelihood of a disaster in the presidential race as well, and early warning signs included the unprecedented number of candidates in the race and the lack of strategic coordination to stop Trump.

Republican voters ultimately did go for Trump, however. In fact, they intervened to wrest control of the nomination back from the delegates. Until just a few weeks ago, Trump’s position had stagnated in national polls and in state-by-state results; before New York on April 19, he’d yet to win a majority in any state, lending credence to the idea that he might have a “ceiling” (albeit a higher ceiling than some originally expected) on his support. From New York onward, however, Trump has won a majority in every state, including some, such as Indiana and Maryland, that didn’t seem especially favorable for him demographically. If you plot the share of the vote Trump received in each state on a graph, it resembles a step function with a sudden lunge upward after Wisconsin, rather than a smooth upward projection.

What happened after Wisconsin? My theory as of a couple weeks ago — and having not gotten so many other things about the Republican race right, I’m sticking to it — is that Republican voters were swayed by Trump’s arguments that the candidate with the most votes and delegates should be the nominee. (Meanwhile, voters regarded Cruz’s wins over Trump at state party conventions as undemocratic.) Some voters might have preferred Cruz or John Kasich to Trump in the abstract, but not at the expense of a contested convention in which the plurality winner would be denied the nomination and replaced with another flawed candidate.

But if that explains why Trump had a strong finishing kick and went from getting 35 or 40 percent of the vote to 50+ percent, it doesn’t explain how he got to 35 or 40 percent in the first place.

To me, the most surprising part of Trump’s nomination — which is to say, the part I think I got wrongest — is that Trump won the nomination despite having all types of deviations from conservative orthodoxy. He seemed wobbly on all parts of Reagan’s three-legged stool: economic policy (he largely opposes free trade and once advocated for a wealth tax and single-payer health care), social policy (consider his constant flip-flopping over abortion), and foreign policy (he openly mocked the Bush administration’s handling of the Iraq War, which is still fairly popular among Republicans).

Previous insurgent Republicans, such as the tea party candidates of 2010 and 2012, had run both as “anti-establishment” candidates and as more conservative than their rivals. Trump kept the anti-establishment branding, although this was also a selling point for Cruz, who often ran neck-and-neck with Trump among voters who said they felt “betrayed” by the Republican Party in exit polls.

But whereas Cruz offered a mix of anti-establishment-ism and movement conservatism — and whereas Marco Rubio offered movement conservatism plus a strong claim to electability — Trump’s main differentiator was doubling down on cultural grievance: grievances against immigrants, against Muslims, against political correctness, against the media, and sometimes against black people and women. And the strategy worked. It’s a point in favor of those who see politics as being governed by cultural identity — a matter of seeking out one’s “tribe” and fitting in with it — as opposed to carefully calibrating one’s position on a left-right spectrum.

Listen to the latest episode of the FiveThirtyEight politics podcast.

What’s much harder to say is whether Trump is a one-off — someone who defied the odds because a lot of things broke in his favor and whose success will be hard to repeat — or if he signifies a fundamental change in American politics. Trump hasn’t brought success to a wave of tea party candidates in gubernatorial and Senate primaries; in Indiana, in fact, the same voters who elected Trump also gave establishment-friendly U.S. Rep. Todd Young a 67-33 victory in the state’s senatorial primary over the tea-party-aligned Marlin Stutzman. And the Democrats have had a relatively orderly nomination process. Still, it’s hard to imagine that American politics will ever be quite the same after this.