NANYANG, China — Last October, as the U.S. budget meltdown was forcing President Obama to abandon a key trip to Asia, China’s top leader, Xi Jinping, seized on Washington’s dysfunction and courted Malaysia with a big trade pact.

“Our two countries have proven to be good neighbors, good friends and good partners who go through thick and thin together,” Xi was quoted as saying in an account of his visit to Malaysia’s capital, Kuala Lumpur, published Oct. 4 by The Star, a Malaysian newspaper.

Five months later, China’s bonds with Malaysia are fraying, a victim of the Malaysia Airlines Flight 370 disaster, which has presumably killed all 239 people on board, two-thirds of whom were Chinese citizens.

China’s government this week issued bellicose statements against Malaysia, its third-largest trading partner in Asia, as the search for the plane entered its third week. It ramped up its rhetoric Monday when Malaysia concluded that the plane had gone down in the south Indian Ocean, based on no findings of debris but rather on a satellite data analysis by Inmarsat, a British company.

Save 75% on a Digital Subscription Today

Such government statements mirror the national mood in China, where the public has been exposed to wrenching news broadcasts of relatives of MH370 passengers weeping, fainting and lashing out at airline officials at a Beijing hotel. They also reflect the fears of Chinese Communist Party leaders that the national mood might turn against them — especially if they don’t project a strong image in the face of an unprecedented national tragedy.

China normally doesn’t issue public demands to its Asian neighbors, partly because it bristles when any of them make anything resembling a demand on China. But this is hardly a normal situation. Never before has China lost so many citizens in an air crash involving a foreign airline.

China has sent ships, planes and technical advisers to search the “target area” off Australia.

The search crews are racing against the clock; the black box in the MH370 will stop sending out signals at some point, generally 30 days after a commercial airliner has been lost.

At the same time, China has played tough with Malaysia, allowing rare public protests and newspaper editorials accusing Kuala Lumpur of outright lies.

On Monday, police stood by as an angry crowd threw water bottles outside the Malaysian Embassy in Beijing, with some demonstrators carrying signs that read, “Malaysian government has cheated us.” Public protests are permitted in Beijing infrequently, and when they happen they’re almost certainly government approved.

On Tuesday, Xi dispatched a special envoy, Zhang Yesui, a vice foreign minister, to meet with top-level officials in Kuala Lumpur.

On Wednesday, Malaysian officials seemed to have had enough of it, countering Beijing’s suggestions that China alone has an interest in learning the fate of MH370.

“For the Chinese families … they must also understand: We in Malaysia also lost our loved ones,” acting Transport Minister Datuk Seri Hishammuddin Hussein said. Fifty of the 239 passengers were Malaysian.

Neither China nor Malaysia can afford to watch their long-standing relationship unravel. Malaysia, with 29.6 million people, is China’s third-largest trading partner in Asia, behind only Japan and South Korea, and the two countries had bilateral trade last year worth $106 billion. They’ve grown increasingly close since 1974, when Malaysia became the first of the countries within the Association of Southeast Asian Nations to establish diplomatic ties with China. More than one-fifth of Malaysia’s population is of Chinese descent.

While analysts don’t expect the MH370 tragedy to seriously damage that economic relationship, there’s anecdotal evidence that the flight’s mysterious disappearance is hurting Malaysian tourism. Various news agencies have reported that online and travel agencies’ bookings between China and Malaysia have fallen sharply in recent weeks.