“I wasted so much energy trying to manipulate my sexuality.”

Ricky Martin can totally relate to the homophobic oppression that pervades The Assassination of Gianni Versace: American Crime Story.

Martin played Antonio D’Amico, fashion icon Gianni Versace’s longtime partner, in the ’90s-set FX drama series. In a new Attitude cover story, he discusses his deep personal connection to the character.

“The level of injustice that we as a community were dealing with back then was heavy,” says the 46-year-old Puerto Rican performer, who didn’t come out publicly until 2010. “I played every role before I even started working on this project.”

“I was a closeted gay man who was making my partners hide,” Martin explains. “I had relationships with other men who were in the closet and I had other relationships with men who were not in the closet but because of me went back into the closet. And so I’m re-living everything that I did.”

“I submitted myself to my career completely,” he continues. “I didn’t open doors to new relationships, and I’m not talking about romantic relationships, I’m talking about any relationship, because I didn’t want people to know me too much.”

“I wouldn’t even sit down and have a cool relationship with amazing producers or great film directors because I was afraid that if they spent more than two hours sitting with me they would know my nature. I wasted so much energy trying to manipulate my sexuality.”

Martin revealed in January that he and Jwan Yosef, who announced their engagement in 2016, had wed in secret.

“He’s my husband,” Martin told reporters at Versace’s premiere. “We’ve signed all the papers that we needed to sign, prenups and everything.” Together they’re raising 9-year-old twins Matteo and Valentino.

Last month Martin said he wanted to help “normalize” open gay relationships like the one Versace and D’Amico had shared.