(New Delhi) Indian Prime Minister Narendra Modi must present to the president on Friday an agreement to form a coalition, after closer than expected results in the legislative elections which forced his party to negotiate with other parties in order to stay in power.

His Hindu nationalist Bharatiya Janata Party (BJP), which has governed for the past ten years with an absolute majority, expected another landslide victory.  But results released Tuesday from the six-week vote showed the BJP had lost its majority, forcing it to negotiate with a group of 15 parties to secure the number of parliamentarians needed to govern.  

The National Democratic Alliance (NDA), which supports Mr. Modi’s ambitions for a third term, “unanimously” chose the 73-year-old prime minister as its leader on Wednesday.

This alliance has 293 seats in Parliament, more than half of the 543 seats in the assembly.

The BJP has not disclosed what concessions it has made to alliance members to secure their support, but several major parties have sought key ministerial portfolios.

Mr Modi’s new dependence on the coalition means his third term could prove much more difficult than expected, the Hindustan Times noted in its editorial on Thursday.  

According to Indian media reports, Mr Modi is expected to be sworn in as prime minister on Sunday evening.

Bangladesh Prime Minister Sheikh Hasina and Sri Lanka’s President said they would attend the ceremony.  

On Tuesday, as his supporters celebrated across the country, Modi said the election results would allow him to pursue his agenda.

“This third term will be one of big decisions. The country will write a new chapter in its development. I guarantee it,” he told a cheering crowd in the capital, New Delhi.

Commentators and exit polls had predicted a landslide victory for Mr. Modi, accused by his critics of jailing opposition figures and trampling on the rights of India’s Muslim community, which is home to more than 200 million people.  

However, the BJP got 240 seats in Parliament, far fewer than the 303 seats it won five years ago and 32 seats short of a majority on its own.