Kevin Spacey's apology to Broadway veteran Anthony Rapp for alleged unwanted sexual advances earned sharp backlash on social media from critics who said the actor not only chose the wrong time to come out as gay but conflated homosexuality and sexual misconduct of a minor.

In an interview with BuzzFeed News, Rapp alleged that when he was 14 years old, Spacey invited Rapp to his apartment before climbing on top of him and making unwanted sexual advances. Spacey was 26 at the time.

"I'm beyond horrified to hear his story. I honestly do not remember the encounter, it would have been over 30 years ago," Spacey wrote in a statement posted to Twitter. "But if I did behave then as he describes, I owe him the sincerest apology for what would have been deeply inappropriate drunken behavior, and I am sorry for the feelings he describes having carried with him all these years."

Lower in the statement, Spacey, who stars in the Netflix series "House of Cards," says the allegations have “encouraged me to address other things about my life," saying "I choose now to live as a gay man."

"House of Cards" will end after its sixth season due out next year, according to The Hollywood Reporter.

Related: Anthony Rapp, Wilson Cruz on 'Star Trek: Discovery' Coupledom

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Celebrities and activists, many of whom are members of the LGBTQ+ community, immediately took issue with Spacey's statement.

"Just wanna be really f----- clear that being gay has nothing to do w/ going after underage folks," wrote comedian Cameron Esposito.

Writer and artist Eve L. Ewing tweeted, "Double shame on Kevin Spacey for calling on the old, tired, erroneous, and harmful idea that there’s some link between gayness and sexual predation as a distraction from his wrongs."

The myth that gay men are likely to sexually abuse children has been a common tactic for stoking public fears about homosexuality, and has been proven false time and time again by psychologists, professors and organizations such as the American Psychological Association.

Actor Anthony Rapp in 2016. Astrid Stawiarz / Getty Images file

"That Kevin Spacey statement. Nope. Absolutely not. Nope," wrote actor and comedian Billy Eichner. "Kevin Spacey has just invented something that has never existed before: a bad time to come out."

Some tweeted that Spacey's decision to reveal his orientation during his apology was a "smokescreen" to distract from his alleged actions.

"Coming out stories should not be used to deflect from allegations of sexual assault,” Sarah Kate Ellis, President and CEO of GLAAD, wrote in a series of tweets. "This is not a coming out story about Kevin Spacey, but a story of survivorship by Anthony Rapp and all those who bravely speak out against unwanted sexual advances. The media and public should not gloss over that.”

Related: Gay Actors Talk Sexual Harassment: 'It Definitely Happens'

Comedian and writer Guy Branum wrote, "The classiest way to come out of the closet is as a PR smokescreen to distract people from the fact that you tried to molest a child."

Comedian and actress Wanda Sykes wrote, "No no no no no! You do not get to 'choose' to hide under the rainbow! Kick rocks!"

LGBTQ+ and Black Lives Matter activist Deray McKesson wrote, "Kevin Spacey really tried to throw the entire LGBT community under a bus and call it solidarity in an effort to mask his personal failings."

Spacey's sexual orientation has been a subject of gossip for decades. In 1997 an Esquire profile titled "Kevin Spacey Has a Secret," insinuated that the actor was gay.

While hosting the Tony Awards earlier this year, Spacey made several pointed jokes about his sexuality, implying he is gay.