Ian McKellen apologized Saturday for claiming Bryan Singer and Kevin Spacey's alleged sexual abuse of minors stemmed from them "being in the closet."

When asked about the multitude of sexual misconduct allegations hitting Singer and Spacey, McKellen, 79, said in a live recording of the #QueerAF podcast last week, “With the couple of names you mentioned of people I worked with, both of them were in the closet. Hence all their problems as people and their relationship with other people. If they had been able to be open about themselves and their desires, they wouldn’t have started abusing people in the way they’re being accused.”

KEVIN SPACEY'S LEGAL TEAM SEEKING ACCUSER'S CELLPHONE, OTHER DOCUMENTS

McKellen, who starred as Magneto in Singer's "X-Men" franchise, as well as in the director's 1998 film "Apt Pupil," also said in the interview that those accused of sexual misconduct should not necessarily be forced to cease working.

“I think that’s rather up to the public. Do you want to see someone who’s been accused of something that you don’t approve of? Do you ever want to see them again? If the answer is no, you won’t buy a ticket, you won’t turn on the television," he said. "But there may be others for whom that’s not a consideration. It’s difficult to be absolutely black and white.”

KEVIN SPACEY SHARES 'HOUSE OF CARDS'-INSPIRED VIDEO AMID SEXUAL ASSAULT ALLEGATIONS

“As part of an extended podcast recently, I suggested that if closeted people were instead open about their sexuality they wouldn’t abuse others. That, of course, is wrong,” the "Lord of the Rings" star wrote on Twitter. “My intention was to encourage the LGBT audience I was addressing, to be proud and open about their sexuality. In doing so, my point was clumsily expressed. I would never, ever trivialise [sic] or condone abuse of any kind.”

BRYAN SINGER SAYS SEXUAL ABUSE ALLEGATIONS ARE 'REHASHED,' BOGUS

He continued, “When it comes to abuse by people in positions of power, the correct response is clear. The accusers must be heard and the accused given the opportunity to clear their names. If the accusations prove credible, the abuser’s access to power should be removed.”

Spacey, 59, is accused of groping an 18-year-old Massachusetts man at a bar in Nantucket in 2016. Spacey pleaded not guilty to sexual assault in January. The "House of Cards" star was accused by numerous others, including "Star Trek: Discovery" star Anthony Rapp, of sexual misconduct. Spacey has denied any wrongdoing.

Several men accused Singer, 53, of sexual abuse against minors in a bombshell report released in January. The "Bohemian Rhapsody" director has vehemently denied all allegations of sexual misconduct.

CLICK HERE TO GET THE FOX NEWS APP

McKellen also came under fire in December 2017 for alleging that actresses had offered directors sex in exchange for roles.