Narendra Modi was sworn in as India’s prime minister on Sunday for a record-equalling third term, but as a restive coalition’s head after a shock poll setback that will test his ability to ensure policy certainty in the world’s most populous nation.

President Droupadi Murmu administered the oath of office to Modi at a grand ceremony at the Rashtrapati Bhavan, the president’s palace in New Delhi, attended by thousands of dignitaries, including the leaders of seven regional countries, Bollywood stars and industrialists.