Indian Prime Minister Narendra Modi's ruling Hindu nationalist party has conceded defeat in a crucial election in one of India's most populous states.

By late Sunday morning India's election commission website showed that an alliance of three parties opposed to Modi's Bharatiya Janata Party was leading in more than 140 seats of the state's 243-seat legislature.

The election for control of Bihar was seen as a referendum on Modi's popularity as he crisscrossed the state addressing dozens of high-profile rallies. No other BJP leaders were as visible through the election as Modi.

Sushil Kumar Modi, the BJP's leader in Bihar, congratulated Nitish Kumar, the leader of the winning alliance.

Bihar is the second major defeat for Modi's party. In February the party was trounced in Delhi state elections.