Zachary Quinto blasted Kevin Spacey for coming out to “deflect” from sexual misconduct allegations.

The openly gay Star Trek actor, 40, took to his Twitter to release a lengthy statement slamming Spacey for using the controversy to come out as gay. Spacey came out Sunday after Rent actor Anthony Rapp accused him of making unwanted sexual advances in the mid-’80s when Rapp was 14 and Spacey was 26.

Get push notifications with news, features and more.

“It is deeply sad and troubling that this is how Kevin Spacey has chosen to come out,” Quinto said. “Not by standing up as a point of pride — in the light of all his many awards and accomplishments — thus inspiring tens of thousands of struggling LGBTQ kids around the world. But as a calculator manipulation to deflect attention from the very serious accusation that he attempted to molest one.”

Quinto also lent his support to Rapp and expressed his hope for the actor’s voice to be the one heard after Spacey’s statement.

“I am sorry to hear of Anthony Rapp’s experience and subsequent suffering. And I am sorry that Kevin only saw fit to acknowledge his truth when he though it would serve him — just as his denial served him for so many years,” he added. “May Anthony Rapp’s voice be the one which is amplified here. Victim’s voices are the ones that deserve to be heard.”

Quinto came out as gay in 2011 after being moved to action by the suicide of gay teen Jamey Rodemeyer. The actor expressed on his blog at the time that he felt he had to do so in order to help the community as a whole.

“In light of jamey’s death – it became clear to me in an instant that living a gay life without publicly acknowledging it – is simply not enough to make any significant contribution to the immense work that lies ahead on the road to complete equality,” he wrote.

In an interview with BuzzFeed, Rapp, now 46, alleged Spacey invited him to his Manhattan apartment for a party in 1986. Rapp says he was the only teen at the party and spent most of the evening in a bedroom watching television. He claims he was unaware the party had ended and he was alone in the apartment with Spacey until the older actor appeared in the bedroom doorway.

“My memory was that I thought, ‘Oh, everybody’s gone. Well, yeah, I should probably go home,’ ” Rapp, who is openly gay, told Buzzfeed. Spacey, he recalled, “sort of stood in the doorway, kind of swaying. My impression when he came in the room was that he was drunk … He picked me up like a groom picks up the bride over the threshold. But I don’t, like, squirm away initially, because I’m like, ‘What’s going on?’ And then he lays down on top of me.”