China lambasted former Japanese Prime Minister Shinzo Abe on Wednesday for "colluding with Taiwan independence forces," a day after he held a virtual meeting with the island's president Tsai Ing-wen.

"China firmly opposes any form of official exchanges" between Taiwan and countries that have diplomatic ties with the mainland, Foreign Ministry spokesman Wang Wenbin told reporters in Beijing.

Wang also said China "expresses its firm opposition to and strong dissatisfaction with" Abe's online talks with Tsai, adding the government has already lodged a "solemn representation" with Japan.

On Tuesday, Abe, who still heads the biggest faction within Japan's ruling Liberal Democratic Party, agreed with Tsai that any attempts to change the status quo by force would not be tolerated in reference to Russia's aggression in Ukraine.

Wang said it is "dangerous" to encourage a breakthrough in relations between Taiwan and Japan by comparing Ukraine with issues surrounding the self-ruled island.

China and democratic Taiwan have been governed separately since they split in 1949 as the result of a civil war. Beijing regards the island as a breakaway province to be reunified with the mainland, by force if necessary.

Japan severed diplomatic ties with Taiwan and established them with mainland China in 1972.

A joint communique signed between Tokyo and Beijing in the same year stipulates that the latter "reiterates that Taiwan is an inalienable part of the territory" of China and that Japan "fully understands and respects this stand."

Sino-Japanese relations have become frayed after Abe, Japan's longest-serving prime minister who stepped down in 2020, said in December that any emergency concerning Taiwan would be an emergency for Japan and for the U.S.-Japan security alliance.