Prime Minister Narendra Modi has won a landslide re-election victory in India, with his Hindu nationalist Bharatiya Janata Party securing a commanding parliamentary majority in the largest democratic exercise in history.

Modi's BJP has won 286 parliamentary seats in India's elections and is on track to win another 17 constituencies, which would give the party a preliminary total of 303 seats, according to the Election Commission of India. Out of 543 seats being contested in parliament, a party or a coalition needs at least 272 votes to form a government.

Modi's main rival was trailing far behind. The Indian National Congress has won just 50 seats and led the counting in another two constituencies, which would give it a preliminary total of 52 seats.

To be clear, while the BJP has garnered enough votes to form a government, votes for some constituencies are still being counted.

Earlier Thursday, the president of the Congress party, Rahul Gandhi, conceded his parliamentary seat to his BJP rival in the constituency of Amenthi which has been held by the Congress party for decades. Gandhi is ahead in the race for the other parliamentary seat he is seeking which is in the state of Kerala, in southern India.

Rahul tweet

On Thursday afternoon, Modi tweeted, "Together we will build a strong and inclusive India. India wins yet again!"

Modi tweet: Together we grow. Together we prosper. Together we will build a strong and inclusive India. India wins yet again! #VijayiBharat

The Wall Street Journal said Thursday that local-television estimates and the official government tally showed BJP and its allies were set to win more than 340 seats — a number that will allow them to form the majority in India's lower house of parliament.

Earlier, investors cheered trends that pointed to a resounding victory for Modi and the BJP. But that optimism faded later in the day.

The Nifty 50 at one point jumped above the 12,000 mark but gave up gains and fell 0.69% to 11,657.05. Meanwhile, the Sensex hit above the 40,000 level before erasing gains to drop 0.76% to 38,811.39. The traded at 69.95 against the dollar, weakening from an earlier level near 69.37.

Expectations for Modi to carry out important, but challenging, reforms that will drive growth are high among investors and India watchers.

"There would be increased expectations of economic reforms going forward, particularly in the areas of factors of production like labor and land," Sanjeev Prasad, senior executive director at Kotak Securities, told CNBC's "Street Signs" on Thursday. "The question is now whether some of the reforms can be delivered as easily as what the market would like to believe."

Prasad pointed out that Modi's government was unable to deliver some of the reforms in areas like land and labor during its previous term. "Let's see over the next few months, whether the government is in a position to deliver on those expectations."

President Donald Trump congratulated Modi and the BJP on their election victory in a tweet, and said he looks forward to continuing "important work together."

Trump Tweet