On Sunday, the Election Commission of India announced the results of elections in Bihar — a state in eastern India with about 100 million people. Americans don’t often hear about state elections in India. But this one was covered around the globe, treated as a referendum on the controversial Indian Prime Minister Narendra Modi of the ruling Bharatiya Janta Party.

Modi has been sharply criticized for his role in deadly anti-Muslim riots in 2002 in Gujarat, the state he governed at the time, and, more recently, for his party’s use of religiously charged rhetoric in the Bihar election campaign. At the same time, Modi has been widely praised for his commitment to India’s economic development. The BJP, traditionally a Hindu nationalist party, has increasingly pitched itself as the party of India’s growing middle class.

Bihar was one of the most bitterly fought state elections in recent memory. And the BJP lost.

Commentators have described this loss as a “a significant blow to Modi’s popularity,” and as a “message to Narendra Modi to reinvent himself” and “stop divisive politics.” The election has been cast as a triumph for a “pluralist vision” of India as well as a harbinger of what is to come in “five upcoming state elections” whose results could dramatically alter the complexion of India’s upper legislative house.

So why is it a big deal that the BJP lost in Bihar? Less than 18 months ago in India’s national elections, the BJP and two smaller allies bagged 29 of Bihar’s 40 seats in parliament. But this week they won less than a quarter of Bihar’s state legislature. Most of the seats instead went to members of the Mahagathbandhan (Grand Alliance), made up of the Janata Dal (United) (JD[U]), the Rashtriya Janata Dal (RJD), and Congress. The first two are regional parties, frequently derided as being caste-based, while the last was India’s ruling party from 2004 to 2014 and for nearly four straight decades after India’s independence.

Some are treating the BJP’s loss as a surprising reversal of its seemingly unstoppable momentum, or as a dramatic defeat for the Modi-led BJP that could slow its quest to dominate Indian politics.

But was it? Let’s take a close look at the numbers behind the seat shares.

1. BJP’s loss wasn’t surprising, if you look at how party alliances shifted between elections.

If you look at India’s 2014 national election, the 2015 Bihar election resulted in exactly what one would forecast based on India’s 2014 national election — that is, if you look at the party alliances. Let me explain. India elects lawmakers using a first-past-the-post electoral system — meaning that whichever candidate gets the largest number of votes in a seat wins that seat, just as in the United States and Britain.

But, unlike in the United States or Britain, in Bihar, many of the major parties don’t compete for every legislative seat. Instead, they ally with other parties, dividing up the state’s seats so that only one party from the alliance is running for any given seat. The idea is that, by uniting their supporters’ votes for any given seat, the allied parties’ candidates are more likely to win any particular contest.

In last year’s national election, the BJP and its two allies combined won about 39 percent of the vote — a record high for the party. (I’m excluding “none of the above” votes here and in the rest of this post). The non-BJP vote was split between two alliances: the JD(U), the party of Bihar’s popular incumbent leader and its small communist ally, and an RJD-Congress alliance. As a result, the BJP alliance won.

But soon after the 2014 election, the JD(U) joined up with the RJD and Congress. If you add up the vote totals from the 2014 election for these parties, you see that the new and expansive Mahagathbandhan alliance would have gotten about 45 percent of the vote — a larger share than the BJP alliance’s 39 percent. In other words, had it existed in 2014, the Mahagathbandhan would potentially have won then, too.

Of course there are other important factors. But while it’s crude, alliance arithmetic is a good place to start forecasting. And those numbers suggested that, unless the BJP-led alliance won more votes than it did at its 2014 record high, it would lose this time around. As it did, this time getting about 35 percent of the vote, just 4 percent less than in 2014.

So yes, Bihar 2015 was a loss for the BJP — but a loss that was modest and hardly surprising.

2. In fact, the BJP’s popularity stayed pretty steady.

Here’s how I get to that conclusion. In a political system like India’s, where parties don’t compete for every seat except as part of larger alliances, it can be hard to assess party popularity. Imagine that a party competes for 20 percent of the seats as part of an alliance — but in the next election, contests 50 percent of the seats. If, in both elections, the party wins 10 percent of the overall vote, that actually means that it did worse in the second election — because its overall share of the vote was spread over many more seats.

To get a better sense of party fortunes, I divide each party’s overall vote share by the share of seats that it contested. The resulting number gives a more accurate assessment of how popular the party is, and how much it’s really winning when it runs.

The graph below shows this figure for the BJP and its two main rivals, the JD(U) and RJD, in the last three national elections and state elections. What is striking about this graph is the BJP’s consistency over time. In the 2015 election, the BJP saw only a very modest downturn in its ratio of vote share to share of seats contested.

3. The BJP is still doing better in Bihar than it used to.

Until recently, the BJP was the junior partner in alliances in Bihar. In terms of size, Bihar is akin to Texas. Just as Texas is key for Republican presidential candidates trying to build an Electoral College majority, a convincing victory in Bihar in a national election can be crucial in cobbling together enough seats to form a government. Until recently, the BJP could not count on winning too many seats in Bihar because it typically ran for less than half of the state’s seats.

That changed in 2014, when the BJP became senior partner and saw its vote share jump dramatically. Even though the party ran in more districts than ever before and without the support of another major party, it performed well in most seats.

And that trend is continuing, despite the 2015 losses. Sunday’s numbers show that the BJP is a much bigger player in Bihar than it was only a decade ago, when state politics revolved around two regional parties, the JD(U) and RJD.

Certainly the BJP isn’t happy to be sitting in opposition in Bihar. But from this election, it learned that it consolidated much of its hard won gains from last year’s election in a state where it needed the support — and that puts the BJP in a good position to build a national legislative majority again. Nevertheless, most of India’s political class — the BJP included — seem ready to call this election a big loss for the BJP, which could breathe new life into India’s opposition parties.

Adam Ziegfeld is an assistant professor of political science and international affairs at George Washington University.