Updated

Facebook showed "predatory" gay conversion therapy adverts to young LGBT people designed to "shame" and "hurt" them.

Some users reported seeing the ads promoting "sexual purity" and "gay cures" as a result of the other Facebook pages they had shown an interest in, according to the Telegraph.

When outraged users clicked on the "why I am I seeing this ad?" option they were told that Facebook believed they were interested in "gender issues".

One of the ads was a video called "Homosexuality was my identity" that was promoting gay conversion therapy: a form of treatment that aims to change a person's sexual orientation based on the assumption that homosexuality is a mental illness that can be "cured".

Several organisations, including NHS England, the British Psychological Society, and the Royal College of Psychiatrists published a “memorandum of understanding” in 2014 describing conversion therapy as “unethical and potentially harmful”.

Facebook user Tessa Ann Schwartz, who complained after viewing one of the ads on the social network, said:  “I don’t know why Facebook has permitted this group to target LGBT people, who have intentionally sought out community and education amongst peers, for shaming and hatred masked as love.”

Another conversion therapy ad promoted a self-help book called Help for Men with Same-Sex Attraction.

Alystair Ryder, a user who saw the advert, said he felt "shaken" by it, adding that “it was written in a way to try to appeal to people who may be depressed or self loathing due to their sexuality".

He continued: "I think it’s pretty irresponsible for Facebook to allow an advert that preys on gay men with mental health issues in such a negative way on their homepage.”

We reached out to Facebook but did not immediately receive a response.

The company told the Telegraph that a "micro-targeting" algorithm blunder caused the since removed ads to appear on young LGBT users' feeds.

This isn't the first time Facebook's ad-targeting tool has come under fire.

This story originally appeared in The Sun.