China has cheered the results of local elections that took place in Taiwan over the weekend and delivered a serious blow to the ruling Democratic Progressive Party (DPP), causing Taiwanese president Tsai Ing-wen to step down as party head.

On Saturday, the ruling DPP lost mayoral elections in the significant cities of Taichung and Kaohsiung, the latter of which it had kept as a stronghold for the last 20 years. Now, the independence-leaning party controls only six of Taiwan’s cities and counties, while the Beijing-friendly Kuomintang party controls 15.

Though there were a number of local issues including pension reforms at play, many saw the elections as a kind of referendum on Tsai’s administration and China. Since she stepped into office in 2016 and refused to explicitly acknowledge the “One China” principle, Tsai has been under constant attack from Beijing. These attacks have only grown bolder over the last year with China snatching away Taiwan’s allies and freezing it out of more international events.

Following the elections, Ma Xiaoguang, spokesman for Beijing’s Taiwan Affairs Office, said that the results reflected the “strong will of the public in Taiwan in hoping to continue to share the benefits of peaceful development of relations across the Taiwan Strait, and their strong wish in hoping to improve the island’s economy and well-being.”

Ma added that China would continue to oppose “separatist elements” advocating for Taiwan independence. The election also saw voters reject a proposal to compete under the name “Taiwan” instead of “Chinese Taipei” in the Olympics. While the International Olympic Committee had already ruled out a name change, the vote was seen as a test to gauge support on the island for independence.

Though Tsai’s resignation as DPP head won’t have many practical consequences, Saturday’s results certainly don’t appear to bode well for her re-election chances in 2020. “Today, democracy taught us a lesson,” Tsai said. “We must study and accept the higher expectations that the people have placed on us.”

Meanwhile, Chinese state media have been taking a victory lap over the DPP’s loss. An editorial in the China Daily reads:

The election shows that the Tsai administration has betrayed Taiwan’s interests and become a troublemaker whose actions have drifted farther away from the practical needs of the Taiwan people and the historical truth of the consensus there is only one China. This has led to the administration encountering a cold shoulder whenever it has tried to wrangle any kind of recognition for a separate status for the island within the international community. The DPP’s heavy defeat in the elections should awaken the Tsai administration from its illusions.

While an opinion piece from the nationalistic Global Times declares:

Tsai and her party have failed to have a clear vision of the world and Taiwan’s real position in the Asia-Pacific political structure. Strategic immaturity and reckless decision-making will probably annihilate their hard-won ruling opportunity. Radical thinking and paranoia that permeates the green camp have misguided the DPP. The party needs to reflect on this failure and make an about-face on its stance in the cross-Straits ties.