Kevin Spacey has come out as gay.

The 58-year-old actor has opened up about living his life ''as a gay man'' while saying sorry to actor Anthony Rapp after the 'Star Trek Discovery' star claimed Kevin made a sexual advance towards him when he was just 14 years old in 1986.

In response, Kevin posted a statement on Twitter which read: ''I have a lot of respect and admiration for Anthony Rapp as an actor. I'm beyond horrified to hear his story. I honestly do not remember the encounter, it would have been over 30 years ago. 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 described having carried with him all these years.

''This story has encouraged me to address other things in my life. I know that there are stories out there about me and that some have been fueled by the fact that I have been so protective of my privacy. As those closest to me know, in my life I have had relationships with both men and women. I have loved and had romantic encounters with men throughout my life, and I choose now to live as a gay man. I want to deal with this honestly and openly and that starts with examining my own behavior. (sic)''

The response comes after Anthony alleged Kevin - who was 26 at the time - tried to ''get with me sexually'' when he picked him up, placed him on a bed and lay on top of him while he was attending a party at the Hollywood star's home.

He told BuzzFeed News: ''My memory was that I thought, 'Oh, everybody's gone. Well, yeah, I should probably go home.'

''[Spacey] 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.

''He was trying to seduce me. I don't know if I would have used that language. But I was aware that he was trying to get with me sexually.''

Anthony also claimed Kevin ''was, like, pressing into me'' and began ''tightening his arms'' but he managed to ''squirm'' away into the bathroom, and then he left.

Speaking about being in the bathroom afterwards, he said: ''I was like, 'What is happening?'

''I saw on the counter next to the sink a picture of him having his arm around a man. So I think on some level I was like, Oh. He's gay. I guess. Then I opened the door, and I was like, 'OK, I'm going to go home now.'

''He followed me to the front door of the apartment, and as I opened the door to leave, he was leaning on the front door[frame]. And he was like, 'Are you sure you wanna go?' I said, 'Yes, good night,' and then I did leave.''

Anthony was starring in play 'Precious Sons' at the time and in the production his character's father - played by Ed Harris - drunkenly mistakes him for someone else and crawls on top of him before making a sexual advance.

He added: ''Looking back, I think that on some level my system was kind of weirdly accustomed to the action [of having a man crawl on top of me], because it had been happening in the play.''

Anthony also admits he feels ''very fortunate'' that ''something worse'' didn't happen during the alleged incident.

His claims come after Hollywood producer Harvey Weinstein was accused of sexual assault and misconduct by more than 50 people.

Following the claims, the 65-year-old movie mogul has been fired from The Weinstein Company and his wife, Georgina Chapman, has left him, but he has denied all allegations of non-consensual sex made against him.