NEW DELHI — Is India’s prime minister, Narendra Modi, in trouble?

With his white beard and booming speeches (and supposedly 56-inch chest), Mr. Modi swept into power four years ago by promoting a populist brand of politics that mixed brawny Hindu nationalist views with lofty economic promises.

But on Tuesday, his party, the Bharatiya Janata Party, got walloped according to elections results just released from races held across five states.

The party, widely known by the initials B.J.P., suffered its worst defeat in recent years, losing more than 100 legislative seats, a result that shook the political establishment and left many wondering if Mr. Modi is in danger of losing next year’s national election.

The elections were held over the past several weeks, but results were not announced until Tuesday. Indian pundits described the races, held in the states of Rajasthan, Madhya Pradesh, Mizoram, Chhattisgarh and Telangana, as the “semifinals” of Indian politics. In just a few months, this country of 1.3 billion people who speak dozens of languages and live across an incredibly varied landscape from Himalayan mountaintops to tropical isles is set to hold national parliamentary elections.