SHANGHAI — American front-line medical personnel are running desperately short of masks and protective equipment as they battle the coronavirus outbreak. China, already the world’s largest producer of such gear by far, has ramped up factory output and is now signaling that it wants to help.

Reaching deals won’t be easy. Increasingly acrimonious relations between Washington and Beijing are complicating efforts to get Chinese-made masks to American clinics and hospitals. A breakdown over the last few days in the global business of moving goods by air around the world will make it costly and difficult as well.

At heart, the two countries, which only recently reached a truce in President Trump’s trade war, have some similar problems. Both face harsh questions over their missteps in responding to the outbreak. Washington and Beijing make handy foils for each other — and essential protective gear could get caught in the middle unless they reach an understanding.

The Trump administration is signaling it isn’t too proud to buy Chinese masks, gowns, goggles and other equipment. At the same time, said Peter Navarro, a senior Trump administration trade official, it will object to any Chinese effort to turn deliveries into fodder for propaganda that would bolster China’s image at home and abroad.