China and India are closely watching the constitutional crisis in Sri Lanka, which has been a battleground in their struggle for geopolitical supremacy in South Asia.
Chinese and Indian diplomats have been careful not to overtly take sides in the political turmoil, which has seen President Maithripala Sirisena oust Prime Minister Ranil Wickremesinghe, replace him with former strongman Mahinda Rajapaksa, and suspend Parliament.
Wickremesinghe, meanwhile, has holed up at the prime minister's residence and insisted he is Sri Lanka's rightful leader.
Sri Lanka has suffered a 'coup without guns':
Parliament speaker Sri Lanka's parliamentary speaker has called the president's sacking of the prime minister a non-violent coup d'etat.
Speaker Karu Jayasuriya is a key figure in the political standoff.
"The entire series of events can only be described as a coup, albeit one without the use of tanks and guns," Speaker Jayasuriya said in a letter dated November 5 to diplomats and foreign missions, adding the "entire matter was pre-planned".
Jayasuriya says the majority of parliamentarians view the change in prime minister as unconstitutional.
In the letter he said some of them were offered bribes and ministerial jobs to support the new government.
He accused Sirisena of acting "contrary to all norms of transparency, decency, democracy and good governance, and contrary to the constitution which he has sworn to uphold and defend."
Sirisena has recalled the parliament on November 14.
At least eight lawmakers have deserted Wickremesinghe and accepted ministerial posts under Rajapaksa, while one deputy minister resigned and joined Wickremesinghe
. India, China cautiously watch Sri Lankan crisis
The caution exercised by the Asian giants stands in contrast to calls from Western diplomats for Parliament to immediately be summoned for a floor vote on Rajapaksa's appointment and underscores the economic and military importance the countries place on the Indian Ocean island nation.
"They're hedging their bets," said Bharath Gopalaswamy, director of the Atlantic Council's South Asia Center.
India and China "both have stakes in the global system and want to play a bigger role, so they have to signal they'll work with whomever."
For China, Sri Lanka is a critical link in its massive Belt and Road Initiative, which aims to use infrastructure projects to expand trade across a vast arc of 65 countries from the South Pacific through Asia to Africa and Europe. It has handed out billions of dollars in loans for Sri Lankan projects over the past decade.
Located just 23 kilometers (14 miles) off its southeast coast, India sees Sri Lanka as a bulwark in its military defenses to ward off potential Chinese incursions and also sees the island as a key partner for regional trade.
India has grown wary of China's economic influence over Sri Lanka and was troubled by a 2014 port visit from a Chinese submarine and warship.
Sri Lanka's ties to both nations date back thousands of years.
It was a stop along China's old Silk Road trade routes, where merchants picked up pepper, cinnamon, ivory and pearl.
Sri Lanka traces much of its genealogy and culture to India, with folklore saying the island's majority Sinhalese are descendants of an Indian prince banished there 2,000 years ago.
The nation's minority Tamils, meanwhile, are in part the descendants of more than a million tea and rubber plantation workers brought to Sri Lanka from southern India by British colonial rulers in the 18th and 19th centuries.
Yet that hasn't always led to smooth relations. During Sri Lanka's decadeslong civil war, which pitted Tamil rebels against the government, India intervened in the 1980s by sending a peacekeeping force that quickly found itself engaged in battle with the rebels.
They were asked to withdraw a few years later amid allegations of abuses against Tamils.
China filled the vacuum left by India, providing military assistance that helped the Rajapaksa-led government defeat the rebels in 2009.
In 2012, China helped block a UN Human Rights Council resolution demanding that the Sri Lankan government investigate war crimes.
It would later pass, but it prompted little action by Rajapaksa, who was in power from 2005 to 2015.
China is partly involved in the current crisis because of tensions over the billions of dollars of loans it has given to build a network of highways, the Hambantota seaport and airport in Rajapaksa's home district, and other projects.
The most iconic of these has been the $1.5 billion port city being built on reclaimed land off Colombo's coast.
Sri Lanka's debt more than tripled during Rajapaksa's presidency, Sri Lankan Central Bank figures show.
Rajapaksa's defeat at the polls in 2015 was partly a reaction to all of that debt, said Gopalaswamy, the analyst.
Likewise, Wickremesinghe, prime minster from 2015, saw his popularity begin to wane last year after his government handed over operations of the Hambantota port to a Chinese company in a 99-year lease.
"From a democracy perspective, there's been huge public resentment because the quality of these projects is questionable, there's little parliamentary scrutiny and no one knows where this money ends up," Gopalaswamy said.
Responding to public outrage over the lease, China in July offered Sirisena a nearly $300 million grant that the president said could be used "for any project of my wish."
With so much at stake, the Chinese ambassador to Sri Lanka, Cheng Xueyuan, was among the first to congratulate Rajapaksa after he was appointed prime minister on October 27.
But that day, Cheng also visited Temple Trees, the official prime minister's residence, where Wickremesinghe has been holed up since his ouster.
China's Foreign Ministry spokesman Lu Kang said that Cheng's visits to rival prime ministers was simply part of China's policy of maintaining "friendly exchanges will all parties in Sri Lanka," repeating China's routine assertion that it doesn't interfere in the internal affairs of other countries.
But after the surprise win of an opposition candidate in the Maldives who campaigned on a promise to reduce China's role in the Indian Ocean archipelago nation, Sri Lanka's strategic position has increased.
If projects in the Maldives are canceled, Sri Lanka would be China's main Indian Ocean link between Asia and the Seychelles, off the coast of East Africa.
A spokesman for Sri Lanka's new government, Kehaliya Rambukwella, said Rajapaksa had spoken to Chinese officials about revising the terms of the Hambantota port lease.
New Delhi doesn't have many options for how to respond to the crisis, said G Parthasarthy, a retired Indian diplomat and an expert on Sri Lanka affairs.
"We would like to see South Asia integrated much more closely with India, so we cannot be seen as taking sides," Parthasarthy said, adding that India's Prime Minister Narendra Modi hosted both Rajapaksa and Wickremesinghe in separate visits to New Delhi last month.
Deputy minister resigns as political crisis grows A deputy minister resigned on Tuesday from Sri Lanka's government after the appointment of a former strongman as prime minister plunged the country into a political crisis.
The resignation of Deputy Minister of Labor and Foreign Employment Manusha Nanayakkara came a day after Parliament Speaker Karu Jayasuriya said he will continue to recognize Wickremesinghe as prime minister until Rajapaksa can demonstrate he controls a parliamentary majority.
In a letter to Sirisena, Nanayakkara said he agrees with the speaker's stance. His resignation is seen as an upset for Rajapaksa's efforts to obtain a majority in Parliament.
Seven members of Wickremesinghe's United National Front have defected to Rajapaksa's side.
During the weekend, the Tamil National Alliance — an ethnic minority Tamil party — said it will support a no-confidence motion against Rajapaksa, after one lawmaker from the party joined Rajapaksa's government.
The Tamil party's 15 votes could give Wickremesinghe's camp a decisive edge over Rajapaksa