China and the United States are competing in a new round of military diplomacy in Southeast Asia this week, as Beijing plays catch-up in an effort to build trust with its neighbours, analysts said.

A joint naval exercise to be held this weekend between China, Malaysia and Thailand in the Strait of Malacca would follow US Defence Secretary James Mattis’s visits to Vietnam and Singapore, a trip which began on Monday.

China is to send three destroyers and frigates, two shipborne helicopters, three Il-76 transport aircraft and a total of 692 servicemen to the nine-day exercise named Peace and Friendship 2018.

The drills start on Saturday and will be held off Port Dickson and Port Klang in Malaysia.

China’s defence ministry said that the exercise was intended to demonstrate the common will of the armed forces of the three countries to maintain peace and stability in the South China Sea region, strengthen practical exchanges and cooperation, and enhance their ability to jointly respond to various security threats.

“It does not target any country,” it added.

The drill will be held amid the increasing bitter competition between China and the United States, which has spilled over into a stand-off between the two countries’ navies in the disputed South China Sea.

Last month an American warship and a Chinese one came close to colliding in the waters near the Spratly Islands.

It is the second time China has taken part in a drill in the Strait of Malacca, which links the Indian Ocean and the Pacific and is one of the world’s most important shipping lanes.

The exercise will follow Mattis’s visits, to Vietnam for the second time this year, and then to Singapore for the Association of Southeast Asian Nations defence ministers’ meeting.

Mattis is meeting key leaders to reaffirm defence relationships and conduct bilateral and trilateral meetings with senior officials, the US embassy in Singapore said.

China claims a large area of the resource-rich sea, but other countries, including Malaysia, have their own competing claims.

Brunei, the Philippines, Vietnam and the self-ruled island of Taiwan also claim various parts of the South China Sea.

Military and diplomatic observers said the trilateral exercise was a way to demonstrate that Asean countries and China can work together on defence and security issues, especially in less sensitive areas.

“For Malaysia and Thailand it’s a way of showcasing confidence-building with China and also signals that they aren’t choosing sides in the Great Power rivalries in the South China Sea,” said Collin Koh, a maritime security specialist at Singapore’s Nanyang Technological University.

“Their intention will be to demonstrate the resolve to promote regional peace and stability with anyone who wishes to do so.”

Koh added: “China will likely see this as yet another showcase to prove that along with Asean countries it can safeguard peace and stability, and of course it may feed into the overall justifications China uses customarily to oppose external interference in the South China Sea.”

Zhang Jie, a South China Sea expert from the Chinese Academy of Social Sciences, said that the drill could help China improve its military cooperation with Asean countries, which has long been a weak spot.

“Take into consideration that such a military exercise would have been prepared long ago. It would not necessarily be aimed at United States, but is more of a trust-building exercise between China and Asean countries,” said Zhang.

“A stable relationship between China and Asean is vital for China to push its Belt and Road Initiative further and empower China when competing against the US in the region,” Zhang added.