BEIJING — Malaysia’s prime minister, miffed by a Justice Department investigation into his nation’s sovereign wealth fund, arrived in Beijing on Monday ready to buy Chinese military hardware, a deal that will rattle his relationship with the United States.

The presence of a Malaysian leader here would normally not get much attention. But China is seizing on another chance to best Washington in the Southeast Asian battleground after a successful visit by the new Philippine president, Rodrigo Duterte, who excoriated the United States during his visit here two weeks ago.

As the Obama administration is winding down, the Chinese leadership is taking advantage of the moment by trying to chip away at the president’s signature policy of the pivot to Asia, offering attractive military and economic deals to America’s friends in Southeast Asia, particularly to those countries that border the contested South China Sea.

Even visits by relatively minor figures, like Gen. Min Aung Hlaing, the head of the army in Myanmar, are being given upbeat coverage in the Chinese state-run news media. President Obama has taken pride in drawing Myanmar closer to Washington.