The Shanghai city government said on Tuesday it was suspending official contact with Prague after the Czech capital Prague signed a sister city agreement with Taiwan's capital, Taipei, in the latest round of Chinese-Czech diplomatic tensions.
Czech President Milos Zeman has pushed ties with China. But the capital's government has taken a much harder line, including Prague Mayor Zdenek Hrib's refusal to eject a Taiwanese diplomat from a conference at the demand of a Chinese official, and his decision to fly the Tibetan flag at City Hall to highlight human rights issues.
Billions of dollars worth of Chinese investments in the country have also not materialised.
Taiwan is China's most sensitive diplomatic issue, as the island is claimed by Beijing as Chinese territory to be taken by force if needed. China has stepped up pressure on foreign governments to fall into line in accepting its claims.
On Monday, Hrib and Taipei Mayor Ko Wen-je signed a sister city agreement in Prague along with other cultural and tourism deals.
The government of Shanghai, mainland China's most cosmopolitan city and its financial hub, said in a statement that Prague's government had made many missteps on Chinese core issues such as Taiwan.
They have "wantonly interfered in China's internal politics and publicly challenged the 'one China' principle", it said. "The Shanghai city government and people strongly rebuke this and express their stern opposition."
Owing to the disappearance of the right "political preconditions", Shanghai will immediately suspend all official interactions with Prague, it added.
China is already angry with Taiwan after President Tsai Ing-wen won re-election by a landslide last weekend in a campaign in which she routinely denounced China's efforts at intimidation and said Taiwan would not be bullied into submission.
Tsai says Taiwan is an independent country called the Republic of China, its official name, and points out that the People's Republic of China has never ruled Taiwan.
Taipei Mayor Ko is no supporter of Taiwan's formal independence. He visited Shanghai last year and has said that the two sides of the Taiwan Strait are part of "one family".
Ko is widely expected to stand for the presidency in the 2024 elections.