A People's Liberation Army (PLA) naval fleet left Hong Kong on Monday morning following a five-day visit.
The SAR government hosted a ceremony at the PLA Hong Kong Garrison on Stonecutters Island to see off the fleet led by the Shandong aircraft carrier.
Chief Secretary Eric Chan said he was thankful that the country sent the vessels to Hong Kong following the 28th anniversary of HKSAR Establishment Day.
He said it allowed members of the public to learn more about China's defence modernisation and feel up close the country's strong military power and scientific and technological developments.
"We are truly grateful for the country's love and support for the Hong Kong SAR. Let us send the highest respect to the sailors, officers and PLA leaders and soldiers stationed in Hong Kong," Chan said.
"I send my most sincere blessings to all members of the formation on behalf of the SAR government and all Hong Kong people. We wish you all a safe journey, as you continue to shoulder the important task of defending the country."
A rear admiral of the fleet, Wang Zesen, said President Xi Jinping authorised the fleet's visit, and it was able to complete all its missions in Hong Kong with the help of the SAR government and the central government's various offices in the city.
Wang said he didn't have the words to describe his excitement at seeing thousands of people board the vessels, and it was good for the fleet to have a variety of exchanges with compatriots in Hong Kong.
Students also took part in the ceremony, with several of them saying they were excited to see the fleet and proud of the country's military strength.