With the government looking at UAE's commitment on terror as a snub to Pakistan , it had another reason to rub its hands in glee on Tuesday, as former Sri Lankan leader Mahinda Rajapaksa 's bid to make a comeback in the parliamentary elections fell through.

The results have validated the outcome early this year of the presidential polls which saw Rajapaksa lose to former ally Maithripala Sirisena , the incumbent president.

Rajapaksa needed a strong showing to emerge as the next prime minister of the island nation but fell short in the end, with the ruling UNP leading. India dreaded a Rajapaksa victory as it was convinced that he would drag Lanka back to the days which saw the country emerge as the main facilitator of China's expanding presence in the Indian Ocean, something which had alarmed not just India but the US too.

According to strategic affairs expert Brahma Chellaney, Rajapaksa's loss represented a defeat for Chinese diplomacy, which worked to turn strategically located Sri Lanka into a pivot of China's 'string of pearls' strategy, now renamed as the Maritime Silk Road.

READ ALSO: Sirisena-Rajapaksa face-off sets stage for Lankan polls

"The election result shows that genuine democracy works as a bulwark against the concerned state mortgaging its sovereignty to become a key component of an external power's regional strategy," said Chellaney.

Sirisena, who has the power to appoint PM, had only last week written to Rajapaksa saying that he was not going to make him prime minister even if his party, Sri Lanka Freedom Party (SLFP), won the election. However, an emphatic victory for Rajapaksa would most likely have prevented Sirisena from using his executive power so decisively. One of the reasons why Rajapaksa emerged as a prime ministerial candidate for SLFP-led United People's Freedom Alliance was that even his defeat in January's presidential election could not dent his popularity within the SLFP.

Until late evening Tuesday the ruling UNP led by PM Ranil Wickremesinghe was leading even though it will likely fall short of 113-seat target for ensuring majority. Sri Lanka legislature has 225 seats.

Even within Sri Lanka, there were many who loathed the idea of Rajapaksa making a fresh bid for power, apparently the reason for Sirisena's letter to Rajapaksa. In fact, the chief of Lanka's central bank had recently threatened to resign if Rajapaksa came to power.

READ ALSO: Sirisena allows Rajapaksa to run for Lankan parliament

Rajapaksa's defeat will be seen as second successive setback for Beijing which was keen to see the former president back in the saddle. India could never fathom why Rajapaksa courted the Chinese so assiduously, even allowing Beijing to dock a nuclear submarine in Colombo despite protest by India. Not even the poor execution of Chinese projects or extremely high interest rates on Chinese loans deterred Rajapaksa. While the former president has recently faced allegations of corruption, Indian officials have long believed that disproportionate assets allegedly acquired by the Rajapaksa family were routed to Sri Lanka through front companies based in southeast Asia.

For the time being though, Indian authorities can stop worrying about Sri Lanka and focus more on Maldives which recently tweaked its land ownership laws apparently to help the Chinese own land there.

As Chellaney said, in that light the erosion of democracy and troubled politics in the Maldives should be a cause for concern. "The setback in Sri Lanka means China will take greater interest in securing a hold in the Maldives, its Plan B, where the regime has already diluted domestic law to allow foreign ownership of land," he said.

READ ALSO: Sri Lankans to elect parliament in 'referendum' on Rajapaksa comeback