Retail giant Amazon announced this week that it will no longer sell books that frame gay, lesbian, transgender, and other sexual identities as a mental illness.

The company made the announcement in a letter sent to Republican senators.

In February, Amazon stopped selling a book by Ryan Anderson, a conservative commentator who is vocally opposed to LGBT rights. In When Harry Became Sally: Responding to the Transgender Moment, Anderson is critical of the transgender community.

Republican Senators Marco Rubio, Mike Lee, Mike Braun, and Josh Hawley wrote to Amazon founder Jeff Bezos to complain about the book's removal.

In response, Amazon said that it reserves the right not to sell certain books.

“As a bookseller, we provide our customers with access to a variety of viewpoints, including books that some customers may find objectionable,” the company said in a letter first published by the Wall Street Journal.

“That said, we reserve the right not to sell certain content. All retailers make decisions about what selection they choose to offer, as do we. As to your specific question about When Harry Became Sally, we have chosen not to sell books that frame LGBTQ+ identity as a mental illness.”

According to research firm Codex Group, Amazon sells 53% of all books sold in the United States and 80% of all ebooks.

LGBT rights advocate GLAAD called Amazon's decision “a positive step in ending the misinformation campaign against LGBTQ people, especially trans youth, meant only to cause harm.

“This book is dangerous and harmful to trans kids, and those who are looking for information about trans identity should not look to resources written by someone who has made their livelihood by publishing screeds against the trans community,” a GLAAD spokesperson said.