Ibrahim Mohamed Solih took office as the new Maldives president Saturday and immediately warned of a "dire" economic crisis as he turned to India for help, signalling an end to the pro-China stance of his predecessor.
Solih, 54, emerged as a common candidate for the opposition that united to oust strongman leader Abdulla Yameen in a September election.
India's Prime Minister Narendra Modi was the most high-profile guest at the inauguration and the pair pledged to work together on the problems faced by the nation of small islands and atolls.
Solih briefed Modi "on the dire economic situation facing the country as he takes office", said a joint statement. He highlighted the critical state of the Maldives' housing, water and infrastructure systems.
It added that Modi promised "to help the new government in meeting its pledges to the people of the Maldives".
India has been the country's traditional main ally but Yameen became close to China and the Maldives saw its foreign debt balloon to more than $1.2 billion during his five years in power.
- Stadium ceremony -
The Solih-Modi statement indicated a reversal of the pro-Beijing policy by the country which relies on tourists visiting its sun-kissed beaches.
"The two leaders, while noting the resilience of the relations between India and the Maldives, expressed confidence in the renewal of the close bonds of cooperation and friendship with the election of Mr Solih as the president of the Maldives," it said.
Modi watched as Solih was sworn in at a special parliament session held at the National Football Stadium in the capital Male.
The Maldives foreign ministry said China's culture minister Luo Shugang was also an invitee.
Leading dissidents and opposition figures were jailed or forced into exile by Yameen, who took power in a controversial 2013 election.
India and Western nations had watched with concern as Yameen also moved closer to Beijing which loaned the strategically placed archipelago hundreds of millions of dollars for roads, bridges and work at the main international airport.
Solih's Maldivian Democratic Party (MDP) has pledged to end what it called "China's colonialism" and to resist a "land grab" in the country which straddles key East-West shipping routes.
MDP leader and former president Mohamed Nasheed has vowed his party would reduce reliance on China and renegotiate loans taken from Beijing.
More than 80 percent of the Maldives' foreign debt is owed to China, he said.
- Beijing loans -
China has also loaned other countries around the Indian Ocean and beyond large amounts of money for infrastructure projects as part of its Belt and Road initiative.
Sri Lanka last year granted a 99-year lease on the Hambantota deep-sea port to Beijing, after it was unable to repay Chinese loans for the $1.4-billion project.
During a recent visit to Colombo in the middle of his election campaign, Solih told reporters that he wanted to repair ties with Sri Lanka and India.
Yameen awarded major infrastructure projects to China while taking away a major airport development from India.
He relied on Beijing for diplomatic support as the Maldives faced international isolation over his dismal rights record.
Modi had cancelled his first visit to the country in 2015 after Yameen detained pro-India Nasheed and eventually had him convicted on a terrorism charge and jailed for 13 years.