BEIJING (Reuters) - Malaysia has agreed to buy four Chinese naval vessels and pledged with Beijing to handle South China Sea disputes bilaterally, a Chinese official said on Tuesday, in what could be China’s latest counter to U.S. influence in the region.

Slideshow ( 10 images )

The vessels are known as littoral mission ships, small craft that operate close to shore. Two will be built in China and two in Malaysia, Malaysian state media reported after a meeting between Chinese Premier Li Keqiang and his visiting counterpart Prime Minister Najib Razak.

Last week, Malaysia’s defense ministry said in a posting on social media that the country would sign a contract to purchase patrol vessels from China during Najib’s week-long visit that began on Sunday, but the post was later removed.

The move marks Malaysia’s first significant defense deal with China at a time of rising tension in the South China Sea.

“Leaders of the two sides agreed to further advance the proper settlement of the South China Sea issue with dialogue through a bilateral channel,” Chinese Vice Foreign Minister Liu Zhenmin told reporters at Beijing’s Great Hall of the People where Li and Najib met.

“Obviously the launching of naval cooperation between the two sides is significant for our bilateral ties. It’s a reflection of the very high level, mutual political trust between our two countries,” Liu said.

He gave no other details on the deal.

Littoral mission ships can be equipped with a helicopter flight deck and carry missiles. They are primarily used for coastal security, maritime patrol and surveillance, but can also be deployed for disaster relief and search and rescue operations.

China claims most of the South China Sea as its territory. But Brunei, Malaysia, the Philippines, Taiwan and Vietnam also have rival claims to parts of the waterway, which commands strategic sea lanes which carry some $5 trillion worth of trade a year.

Najib’s visit follows that of Philippines President Rodrigo Duterte, who announced the country’s “separation” from the United States and signed a raft of memoranda of understanding for Chinese investment in the country.

The push to strengthen China ties comes after July lawsuits filed by the U.S. Justice Department implicating Najib in a money-laundering scandal. Najib has denied any wrongdoing and said Malaysia will cooperate in the international investigations.

“I think there’s a mischaracterisation here. There’s no such thing as using our financial muscle to improve ties,” Liu said in response to a reporter’s question on the issue.

Both nations also signed deals for collaboration to build rail projects in Malaysia, which included the 55 billion ringgit ($13.2 billion) East Coast Rail Line.

Najib told Malaysian state news agency Bernama that both countries had made a historic achievement by signing 14 agreements totaling 143.64 billion ringgit ($34.4 billion).

($1 = 4.1790 ringgit)