The US has ordered China to close its consulate in Houston, Texas, by Friday - a move described as "political provocation" by Beijing.
The US State Department said the decision was taken "in order to protect American intellectual property".
But China's foreign ministry spokesman Wang Wenbin said it was "outrageous and unjustified".
The statements came after unidentified individuals were filmed burning paper in bins in the building's courtyard.
Tensions have been rising between the US and China for some time. President Donald Trump's administration has clashed repeatedly with Beijing over trade and the coronavirus pandemic, as well as China's imposition of a controversial new security law on Hong Kong.
Then on Tuesday,
the US Department of Justice accused China of sponsoring hackers who had been targeting labs developing Covid-19 vaccines. Two Chinese nationals, who allegedly spied on US research companies and got help from state agents for other thefts, have been charged.
Why did the US say it was closing the consulate?
The US State Department released a statement shortly after Mr Wang spoke on Wednesday.
"We have directed the closure of PRC [People's Republic of China] Consulate General Houston, in order to protect American intellectual property and American's private information," State Department spokeswoman Morgan Ortagus said.
The consulate is one of five in the US, not counting the embassy in Washington DC. It is unclear why this one was singled out.
Ms Ortagus added the US "will not tolerate the PRC's violations of our sovereignty and intimidation of our people, just as we have not tolerated the PRC's unfair trade practices, theft of American jobs, and other egregious behaviour".
Ms Ortagus also pointed to the Vienna Convention on diplomatic relations, under which states "have a duty not to interfere in the internal affairs" of a host country.
In a separate statement, the State Department accused China of engaging "in massive illegal spying and influence operations", interfering in "domestic politics" as well as having "coerced our business leaders, threatened families of Chinese Americans residing in China, and more".
How did China react to the order?
China called the decision "an unprecedented escalation", saying it violated international law. Mr Wang went on to say Washington had been "shifting the blame to China with stigmatisation and unwarranted attacks".
He urged the US to reconsider, saying if it insists "on going down this wrong path, China will react with firm countermeasures".
Media captionLiu Xiaoming: China is not the enemy of the US
"In reality, in terms of the number of Chinese and American embassies and consulates in each other's countries and the number of diplomatic and consular staff, the US has far more people working in China," Mr Wang said.
Chinese state media outlet
the Global Times began running a poll on which US consulate to close in response.
Later, the foreign ministry posted a warning to Chinese students in the US, asking them to "be on guard" as "US law enforcement agencies have stepped up arbitrary interrogations, harassment, confiscation of personal belongings and detention targeting Chinese international students in the US".
In danger of a spiralling battle
This is clearly a significant development in the diplomatic sparring between Washington and Beijing.
The closure of the Chinese consulate in Houston comes soon after news emerged of the unsealing of a US indictment against two men accused of spying on US vaccine development on behalf of China's security services. It is not clear if the two episodes are linked. But it is clear that the Trump administration is determined to step up its very public calling out of Beijing.
In the midst of a presidential re-election campaign and with the US economy and society battered by the Covid-19 pandemic, Mr Trump has determined that there is political advantage in playing the China card.
It is hard to see how Beijing can avoid some equivalent response. The danger now is of a spiralling tit-for-tat battle, driven in part by US domestic considerations, which can only make the complex and developing tensions between the US and China even worse.
What is happening at the consulate?
The first signs something unusual may be happening at the Houston consulate emerged on Tuesday, when people overlooking the building's courtyard noticed several bins on fire.
Footage shows people throwing what appears to be paper into the bins. It is not known who they were. People were later filmed appearing to pour water on the bins.
Emergency services were called to the building on Tuesday evening. However, the
Houston police force said on Twitter officers "were not granted access to enter the building", but did see smoke.
Mr Wang did not directly address the fires in the consulate's courtyard, simply saying it was operating as normal.
What is stoking tensions between China and US?
There are a number of flashpoints between Beijing and Washington currently. Some of the most serious are:
- Coronavirus: President Trump has repeatedly referred to Covid-19, the first cases of which were reported in Wuhan in late 2019, as the "China virus". He has also alleged it originated from a Chinese laboratory, despite his own intelligence officers saying it "was not manmade or genetically modified". In response, Chinese officials have suggested that Covid-19 might have originated in the US, without evidence.
- Trade: Mr Trump has long accused China of unfair trading practices and intellectual property theft, but in Beijing there is a perception that the US is trying to curb its rise as a global economic power. The US and China have engaged in a tit-for-tat tariff war since 2018 as a result of the dispute.
- Hong Kong: China's imposition of a sweeping new national security law in Hong Kong in June led the US to revoke the region's preferential economic treatment. Mr Trump has also signed a law to impose sanctions on officials who cracked down on rights. Beijing has accused the US of "gross interference" in its domestic affairs, promising it would retaliate.