Port workers at Hambantota gave an enthusiastic welcome to the Yuan Wang 5, waving Sri Lanka and China flags, while the ship displayed a large banner reading: "Hello Sri Lanka."
However, the ship's arrival appears to have aggravated tensions between New Delhi and Beijing, who have both spent billions of dollars on development and deals with Sri Lanka, an island of 22 million people that sits on a key trading route.
The Yuan Wang 5 had originally requested permission to dock at the port last week, but the visit was delayed after concerns were raised about the ship's presence, though India denied putting any pressure on Colombo.
China says the ship is used for scientific research, but the US Defense Department says the ship is under the command of the People's Liberation Army (PLA) and is capable of tracking satellites and missile launches.
On Saturday, Sri Lanka's Foreign Ministry said the government had engaged in "extensive" consultations with "all parties concerned" with a "view to resolving the matter in a spirit of friendship, mutual trust and constructive dialogue."
It said the ship had been given permission to dock on the condition that no scientific research was conducted in Sri Lankan waters.
The ship's arrival at the Hambantota port was always going to be controversial -- China leased the port from Sri Lanka in 2017 for 99 years after Colombo failed to pay debts related to the construction of the facility.
At the time, the deal raised concerns that it would give China access to a key shipping route, putting it within India's traditional sphere of influence. And the presence of a ship packed with advanced technology has made Sri Lanka's neighbors nervous.
According to a US Defense Department report published last year, the vessel is under the command of the PLA's Strategic Support Force (SSF), "a theater command-level organization established to centralize the PLA's strategic space, cyber, electronic, information, communications, and psychological warfare missions and capabilities."
"The SSF also operates Yuan Wang space support ships that track satellite and intercontinental ballistic missile (ICBM) launches," the US report said.
Carl Schuster, a former US Navy captain and former director of operations at the US Pacific Command's Joint Intelligence Center, said New Delhi's concern about the ship's presence in Sri Lanka was likely due to its monitoring capabilities.
"Spying is not her primary mission ... her primary mission is satellite tracking and monitoring PRC rocket launches, telemetry, and satellite status ... but that same capability can and often is employed to monitor other countries' satellite operations, downlinks and missile telemetry," he said.
China's Ministry of Foreign Affairs said on Tuesday the ship is conducting scientific research "in accordance with international law."
It "does not affect the security and economic interests of any country, and should not be interfered with by third parties," spokesman Wang Wenbin said.
The Yuan Wang 5 has become a symbol of rising tensions between India and China -- both of which have financially supported Colombo as it experiences its worst financial crisis in decades.
India has provided crucial assistance to Sri Lanka as it suffers food, fuel and medicine shortages, lending $4 billion in credit lines.
China is also a major creditor of Sri Lanka, and is vital to Sri Lanka's efforts to restructure its debt to secure a bailout from the International Monetary Fund.
Relations between India and China have long been tense, though in recent years a prolonged military standoff along their shared Himalayan border has claimed dozens of lives.
Meanwhile, India has grown closer to the United States in a bid to balance China's increasingly assertive stance in the Indo-Pacific. In October, Washington and New Delhi will hold a joint military exercise less than 100 kilometers (62 miles) from the disputed India-China border -- further straining ties between the two nuclear-armed powers.
In late July, India's Ministry of Affairs spokesperson Arindam Bagchi expressed concern over the Chinese vessel's visit to Sri Lanka, telling reporters the "government carefully monitors any development having a bearing on India's security and economic interests and takes all necessary measures to safeguard them."
On August 5, Sri Lanka's Ministry of Foreign Affairs sent a letter to the Embassy of China in Colombo deferring Yuan Wang 5's arrival "until further consultations" had been made on the matter.
Three days later, without naming India, China's Ministry of Foreign Affairs spokesperson Wang said "the brutal interference" in Sri Lanka's foreign relations was "an act of taking advantage of someone when they are in danger, which is against the basic norms of international relations."
India later rejected claims its concerns were the cause of delay in the ship docking, with Bagchi telling reporters last week, "Sri Lanka is a sovereign country and makes its own independent decisions."
On Monday, India demonstrated the strength of its commitment to Sri Lanka, gifting the island nation a reconnaissance aircraft in a ceremony attended by the Sri Lankan President.
The gift of an aircraft "underscores the cooperation" between the maritime neighbors, India's Ministry of External Affairs said in a statement.
Sri Lanka presents the ideal trans-shipment hub for Chinese imports and exports -- and remains "very strategic to India," said Sushant Singh, a senior fellow at New Delhi's Centre for Policy Research.
Sri Lanka had been "caught between a rock and a hard place," he said, referring to India and China in no particular order.
"The Chinese had put pressure on them. The Indians had put pressure on them. And they cannot afford to lose any help. All countries which are small and economically weak will face these challenges if they are in a tough neighborhood."
China has for decades invested in Sri Lanka when much of the international community held back.
As many Western countries withheld funding to Sri Lanka over alleged human rights abuses during a decades-long civil war, which ended in 2009, China supplied the former Rajapaksa government with economic aid, said Ganeshan Wignaraja, senior research associate at the British think tank, ODI Global.
"Sri Lanka then thought it could use China as a vehicle for infrastructure-led economic development," he said.
Between 2005 and 2017, China spent nearly $15 billion in Sri Lanka, but as the island nation's economic fortunes waned, it struggled to pay back its debt and the countries agreed on the long-term port deal.
Wignaraja said by sending the Yuan Wang 5 to Hambantota port, it was testing the boundaries of that deal.
"China was testing the terms of the lease agreement by sending a craft which has satellites on board and has a highly advanced capability," Wignaraja said.