With bilateral relations in free-fall, Beijing is bracing for more turbulence in the run-up to the US election in November, and the possibility that a Joe Biden presidency presents an opportunity to avoid a deeper conflict.
Washington's demand this week that China shut its Houston consulate in 72 hours infuriated Beijing and forced a retaliatory order to close the U.S. consulate in Chengdu.
As usual, China did not directly criticise President Donald Trump, who often speaks of his personal friendship with President Xi Jinping, but in caustic editorials state media portrayed the move as an election gambit.
Some Chinese government and military hawks see four more years of Trump as an opportunity to accelerate China's ascent. Many in China have gained confidence in its standing as they watch his tumultuous presidency, including its handling of Covid-19.
But along with exasperation over Trump's unpredictability and penchant for tariffs, and wariness of Washington's hostility on multiple fronts, is rising worry over the risk of sharper confrontation, according to six Chinese officials and people with ties to the leadership.
READ MORE: US-China spat rattles the world
Frequent criticism of "Communist" China and its ruling Communist Party - Secretary of State Mike Pompeo used the word 27 times in a speech on Thursday that called a more assertive approach to China the "mission of our time" - also rankles in Beijing.
Caught off guard by Trump's 2016 victory, China dispatched government think tanks to make an earlier start preparing reports on the election and U.S. public sentiment, with a focus on Democratic challenger Biden and his policies, sources familiar with the matter said.
"There are no illusions about restoring relations back to the good old days, but a new president at least provides a chance to reset relations," said one Chinese official, declining to be identified given the sensitivity of the matter.
"After all, you can't get a worse relationship than the current one," he said.
The Trump administration has said its harder line on China is justified by what Pompeo and others have described as a more authoritarian turn by Beijing, the theft of intellectual property and its military ambitions in the South China Sea and beyond.
Being tough on China is now the bipartisan default stance in the United States, and a Biden administration is expected to be more likely to join with allies in confronting Beijing, and to take a tougher line on human rights.
But a Biden presidency could be more inclined towards engagement - from a new "position of American strength", as campaign insiders put it, amid renewed investment in U.S. competitiveness, innovation and infrastructure.
"The Chinese seem to be under no illusions that a Biden victory would reverse Washington's view of China, but will likely make an overture for dialogue with a new administration," said Daniel Russel, the top diplomat for East Asia under President Barack Obama and early in the Trump administration.
Russel has no formal role in the Biden campaign but is close to the candidate's foreign policy advisers.
Both the Biden and Trump campaigns say China is rooting for the other.
Tim Murtaugh, Trump 2020 Communications Director, said China is undoubtedly pulling for Biden. "He has a record of appeasing them and advancing their interests throughout his 47 years in Washington," Murtaugh told Reuters.
Andrew Bates, a Biden campaign spokesman, said China has had a free-for-all under Trump, calling him "the weakest president in American history with respect to China."
With bilateral ties slumping, some officials and analysts in Beijing said China's broad approach over coming months will be to try to manage tensions with Washington and retaliate only when necessary.
That teeth-gritting has been reflected in relatively muted responses to recent U.S. moves, such as its declaration that Beijing's South China Sea claims are illegal. Beijing's move to shut the Chengdu consulate was proportionate, and China has continued to urge Washington to reconsider the Houston ouster.
However, Beijing is unlikely to make any significant overtures for dialogue, given what it sees as the futility of engagement in a campaign season when anti-China sentiment is running high.
"China is angry with Trump for his criticism of China and for his action of imposing sanctions on China," said Shi Yinhong, an adviser to China's cabinet and a professor at Beijing's Renmin University.
"Moreover, the Chinese sense that his political standing at home seems to have been shaken, so his value has dropped."
- By Keith Zhai in Singapore, Tony Munroe and Yew Lun Tian in Beijing, and Michael Martina and David Brunnstrom in Washington