(CNN) - Taiwan has lashed out at China's state media for attempting to take credit for the island's historic decision to legalize same-sex marriage.
On Friday, Taiwan's legislators passed a bill making same-sex marriage a reality, the first place in Asia to give LGBT couples many of the same rights as their heterosexual peers.
LGBT activists were overjoyed at the news, but some of the most unlikely praise came from the Chinese Communist Party's mouthpiece.
"Local lawmakers in Taiwan, China, have legalized same-sex marriage in a first for Asia," tweeted the People's Daily newspaper on Friday, along with a rainbow color-infused animated image that says "love is love" underneath.
"Wrong!" Joseph Wu, Taiwan's foreign minister, shot back on his department's official Twitter account Sunday. "The bill was passed by our national parliament and will be signed by the president soon. Democratic Taiwan is a country in itself and has nothing to do with authoritarian China."
"(People's Daily) is a commie brainwasher and it sucks."
Taiwan and China are separated by fewer than 130 kilometers (81 miles) at their closest point. For seven decades, the two have maintained an uneasy truce following their split at the end of a bloody civil war in 1949.
Unification is a long-term aim for China's ruling Communist Party, which regards self-governed Taiwan -- an island of 23 million people -- as a renegade province.
The historic vote in Taiwan came almost two years after the island's Constitutional Court ruled existing laws -- which defined marriage as between a man and a woman -- to be unconstitutional.
Despite sharply divided public opinions, Taiwan's legislators passed the law only a week before a court-set deadline to enact marriage equality laws. It will go into effect on May 24.
As thousands of people in Taipei took to the streets to celebrate the outcome, Beijing's propaganda authorities appeared to see an opportunity to stake a claim on China's sovereignty over Taiwan and to highlight China's supposed LGBT-friendliness.
The news from Taiwan was among trending topics Friday on Weibo, China's equivalent of Twitter. It has remained a widely discussed story, generating largely positive comments, despite the Chinese government's growing censorship on all LGBT-related subjects on social media.
Global Times, a state-run tabloid known for its nationalistic rhetoric, posted a video Saturday showcasing gay social life in Beijing. The three-minute clip features interviews with local advocates as well as foreigners praising the Chinese capital's inclusive culture, complete with footage of drag queen performances.
Homosexuality is not illegal in China and the authorities in 2001 removed it from the official list of mental disorders. But activists and experts agree that prejudices and discrimination persist, as well as periodic government crackdowns.
Since he came to power in late 2012, Chinese President Xi Jinping has increasingly stressed the Communist Party's absolute control over all aspects of society, resulting in a push for more rigid moral codes and even less room for LGBT visibility and advocacy.
In March, nearly all LGBT content was scrubbed from "Bohemian Rhapsody," the award-winning biopic of British rock band Queen, for the Chinese audience. Deleted scenes range from two men kissing to the word "gay."
Last November, an author of same-sex erotic fiction was sent to jail for 10 years. In 2016, Chinese censors banned the portrayal of "abnormal sexual behavior" in TV and online shows, including gay and lesbian relationships.
Still, some Chinese activists want to focus on the positive impact of Taiwan's legalization of same-sex marriage may have on the mainland.
"It offers us a lot of hope," Xiaogang Wei, a leading LGBT rights activist who heads the Beijing Gender Health Education Institute, told CNN on Friday.
"The Chinese government has pointed to cultural tradition as a reason for same-sex marriage being unsuitable in China. But the decision in Taiwan, which shares a cultural tradition with us, proves that Chinese culture can be open, diverse and progressive."