image sourceSimon and Schusterimage captionThe singer later became an Archbishop, establishing a network of LGBT churches

Archbishop Carl Bean, a former Motown singer best known for the 1977 gay liberation anthem I Was Born This Way, has died at the age of 77.

Featuring the lyrics "I'm happy, I'm carefree, and I'm gay, I was born this way", it was a disco hit in the US and inspired Lady Gaga's Born This Way.

She credited him as an inspiration, saying his song was "like a sermon".

At the height of his music career, Bean worked with Dionne Warwick, Sammy Davis Jr, Burt Bacharach and Miles Davis.

But he turned down the offer of more work at Motown when they asked him to sing more commercially-viable love songs about women.

Instead, he went on to become an Aids activist and founded a network of LGBT churches.

"Archbishop Bean worked tirelessly for the liberation of the underserved and for LGBTQ people of faith and in doing so, helped many around the world find their way back to spirituality and religion," the Unity Fellowship Church Movement said in a statement.

It said he had made the "transition to eternal life" on 7 September "after a lengthy illness".

figure captionWarning: Third party content may contain adverts

Born in Baltimore in 1944, Bean was raised by his next-door neighbours after his mother died during an abortion.

He was actively involved in the church and the black civil rights movement from a young age, with the two often intertwining.

"I was introduced to Jesus as a rabble rouser who made things happen," he later recalled. The image of Jesus as an outsider, who embraced people from all walks of life, inspired him and taught him an early lesson about acceptance.

Electroshock therapy

As a teenager, he found himself attracted to boys in the neighbourhood, and also alleged that an "uncle" – the brother of one of his guardians – sexually abused him.

Both revelations emerged at the same time and, in the ensuing turmoil, the family kicked him out.

"Being basically a foster child, I felt like, now I'ma be kicked out because I'm a queer," he told Vice in 2016. "I attempted suicide and landed in the mental health ward of a big hospital."

The hospital insisted on treating him with electroshock therapy, but Bean found an ally in a German psychiatrist who helped him come to terms with his sexuality.

"She said, 'There are many people like you. I can't do what your parents want – make you a heterosexual – but I can help you accept who you are and go for your dreams,'" he recalled.

"That gave me enlightenment and the chance to accept myself. If I had another doctor, I might have been a different animal."

Music was a solace for Bean and, after being released from hospital, he started performing gospel songs around Baltimore.

At 16, he moved to New York, where he became involved in the rich culture of the Harlem churches, and appeared in an early production of Langston Hughes's influential show Black Nativity.

image sourceGetty Imagesimage captionAfter quitting music, Bean became an influential LGBT minister and Aids activist

After another move to Los Angeles, he formed the group Carl Bean and Universal Love. But the band faltered because, in his words, they were too far "ahead of the curve".

"I was part of a movement looking to erase the line between R&B and gospel," Bean later explained in his autobiography.

However, the band's 1974 single Gotta Be Some Change caught the ears of producers at Motown Records, who asked him to record a song written by Bunny Jones, I Was Born This Way.

'A natural fit'

Label owner Berry Gordy thought Bean "would be perfect" for the track, sister and fellow Motown executive Gwen Gordy later recalled. "It's a message song with a gospel feel. [Berry said] Bean will tear it up."

Although the lyrics were unconventional at the time – arriving before the Village People made an explicit connection between disco and homosexuality – Bean felt the song was a perfect fit.

"I always say the lyric found me, and it was very natural," he told US radio station NPR in 2019.

Although the song had already been released a year earlier by recording artist Valentino, Bean's version became the definitive take, reaching number 15 on the US dance charts in 1978.

Aids activism

After turning down a Motown career, he turned his attention back to the church and was ordained in 1982. That year, he also founded the Unity Fellowship of Christ Church for black LGBT congregants, whose motto is: "God is love and love is for everyone."

Before long, he was asked to help establish similar congregations around the US and Caribbean.

"I told them, 'If you can get 10 black gay men and lesbians together, who aren't afraid to be out, I will come and talk.' So I went to many cities for many years, and only went back to LA around 1995," he told Out Alliance.

Bean also founded the Minority Aids Project in 1985, which was the first community organisation to focus on the spread of Aids in the black community at a time when the disease was relatively new and misunderstood.

He was honoured many times for his work, receiving an NAACP Image Award in 1987, and having an intersection in Los Angeles named in his honour two years ago.

figure captionWarning: Third party content may contain adverts

I Was Born This Way remained an important anthem for the gay community and gained a new lease of life in 2011 when Lady Gaga used it as the foundation for her own hymn to acceptance, Born This Way.

"I heard this song. And I just said, 'Man, does that answer every question'." the star once told radio host Howard Stern.

Bean said he was honoured and flattered that Gaga had referenced his biggest hit.

"I felt it was a great tribute, and it was the continuation of saving lives," he said.

"So you know, [I Was Born This Way] has just been a blessing to my life. And it's been a blessing, once again, to even another generation's life through the take that Gaga did on it."

Follow us on Facebook, or on Twitter @BBCNewsEnts. If you have a story suggestion email [email protected].