Image copyright Courtesy of Abigail Jones Image caption "The only way I will rest in peace is if one day transgender people aren't treated the way I was," Leelah Alcorn wrote before her death

US President Barack Obama has condemned psychiatric therapies designed to "repair" gay, lesbian, bisexual and transgender youth.

Mr Obama's statement was in response to an online petition calling for a ban on conversion therapies. It gained over 120,000 signatures in three months.

The petition was inspired by Leelah Alcorn, a 17-year-old transgender youth who killed herself in December.

Some conservative groups and religious doctors support conversion therapy.

"We share your concern about its potentially devastating effects on the lives of transgender as well as gay, lesbian, bisexual, and queer youth," White House adviser Valerie Jarrett wrote in response to the petition.

"As part of our dedication to protecting America's youth, this administration supports efforts to ban the use of conversion therapy for minors."

Image copyright AP Image caption Vigils were held after Ms Alcorn's suicide in December

Counselling and prayer is used in conversion therapy to help some Christians deal with gay feelings.

"We believe that change is still possible. People go to therapy because they can change, because it really does work," David Pickup, a family therapist in California and Texas, told the New York Times. "We help people grow into their authentic selves."

But mental health groups and gay rights activists say it can increase the risk of depression or suicide.

The US states of California and New Jersey have banned the practices. But other conservative states such as Oklahoma are considering legislation to protect the therapies from legal challenges.

While the White House is not explicitly calling for congressional legislation to ban the therapies nationwide, Mara Keisling, the executive director of the National Center for Transgender Equality, welcomed Mr Obama's statement.

"Having President Obama and the weight of the White House behind efforts to ban conversion therapy is so critical in the fight for transgender and LGBT young people," Ms Keisling said.

In the letter posted on Tumblr, Ms Alcorn said she killed herself after years of struggling with her strict Christian parents' refusal to acknowledge her true identity as a female.

She ended her note with a plea: "The only way I will rest in peace is if one day transgender people aren't treated the way I was... My death needs to mean something. Fix society. Please."