SINGAPORE — Defense Secretary Jim Mattis tried to lower the temperature on the array of hostilities between Washington and Beijing on Thursday, saying it is up to the militaries of the two competing global superpowers to act as a stabilizing force amid rising political tensions.

During an hour-and-a-half meeting with his Chinese counterpart, Mr. Mattis sanded down some of the sharp edges from Vice President Mike Pence’s pointed critique of China this month. Mr. Mattis urged the two militaries to talk through their many differences and even repeated an invitation for Wei Fenghe, China’s defense minister, to visit the United States, according to a senior Defense Department official who was in the meeting.

But the cordial tone belied deep tensions that showed no signs of abating on Thursday. China, as it usually does, brushed off Mr. Mattis’s complaints about Beijing’s continued militarization of disputed islands in the South China Sea.

Meanwhile, other countries present at a meeting in Singapore of Southeast Asian nations continued to resist American entreaties to add their voices to the American challenge of China’s claims in the disputed area. And two of those countries — Malaysia and Thailand — prepared for a joint naval exercise with China that American officials worry is part of a larger effort by Beijing to peel away American allies.