Image copyright Pu Chunmei Image caption Activist Pu Chunmei (left) was one of several Sina Weibo users who protested against the ban

Chinese social media network Sina Weibo has backtracked from a controversial gay content ban after a massive outcry.

Last Friday the microblogging platform said that posts related to homosexuality would be taken down.

It prompted a deluge of posts from outraged netizens protesting against the decision. On Monday, Sina Weibo said it would reverse the ban.

Often described as China's answer to Twitter, Sina Weibo is one of the most popular social networks in the country.

What happened?

Last Friday Sina Weibo made a surprise announcement that it was launching a "clean-up campaign".

It said that for the next three months, the platform would remove content including images, videos, text and cartoons that were related to pornography, violence, or homosexuality.

"This is to further ensure a clear and harmonious society and environment," the network said in its statement, adding that it had already scrubbed more than 50,000 posts by then.

Sina Weibo said it was initiating the clean-up because of stricter internet laws put in place last year, but it did not explain why it was only acting now.

Chinese authorities have embarked on a campaign in recent years aimed at purging internet content that it deems inappropriate.

By early Monday morning, the most censored search term on Weibo was "homosexuality", according to censorship tracker FreeWeibo.

How did netizens react?

Over the weekend many in the LGBT community took to the network to protest against the decision, using hashtags such as #IAmGay# and #ScumbagSinaHelloIAmGay#.

Some tried testing the ban and uploaded pictures of themselves with partners or gay friends or relatives.

Among them was LGBT rights activist Pu Chunmei, whose impassioned post accompanied with pictures of her with her gay son quickly went viral.

Image copyright Pu Chunmei Image caption Ms Pu posted this picture with the caption: "Be yourself, don't hide."

"My son and I love our country... we are proud to be Chinese!" she said. "But today I saw the announcement by Sina Weibo...as a source of news, it is discriminating and attacking minorities, and this is violence!"

Another widely-shared post was of an undated video showing a social experiment where gay volunteers stood in the street inviting passers-by to hug them. The poster claimed the original video had been taken down, and said "today I couldn't help myself but post this again".

Image copyright Sina Weibo / Yimoshushu

As of early Monday morning many such posts were still online, as censors appeared to struggle to keep up with the deluge.

Then Sina Weibo made another announcement: it said its clean-up would "no longer apply to homosexual content".

"We thank everyone for their discussion and suggestions," the company added.

Netizens cheered the reversal. "There is absolutely nothing wrong with being homosexual...we hope that Weibo will not perpetrate such discrimination in the future," said one user.

What is China's stance on LGBT rights?

Homosexuality was decriminalised more than two decades ago. Conservative attitudes still prevail in many parts of the country, but that has not stopped the LGBT community and activists from having a strong and vibrant presence.

Image copyright Getty Images Image caption Though gay marriage is officially not allowed, some gay couples have held ceremonial celebrations to raise awareness

But in recent months, some began to fear that this presence was starting to be curtailed by conservative forces.

Some saw the Sina Weibo ban as part of a larger trend of sidelining the LGBT community, including a move last year by an official media watchdog that deemed homosexual content as "pornographic and vulgar".

The official Chinese government response has always been "neither supportive nor against" homosexuality, where it "does not promote" LGBT rights, activist Li Tingting told BBC Chinese.

There was no official reaction from the Chinese government to Sina Weibo's initial ban, nor to the subsequent reversal.

Additional reporting by Gwyneth Ho.