Neil Patrick Harris decided to come out of the closet late last year because he sensed "this sort of witch-hunt brewing," the actor says.
"There was a little of media scrutiny heading my way," Harris told Ellen DeGeneres in an episode of her talk show airing Thursday.
"People were starting to ask for stories about other people that may have fooled around with me, and the last thing you want to do is talk about your private life based on a scandal.
"I'm not a very scandalous person and so I didn't want to have to respond to some story, whether it was lie or truth, so I just made a statement and sort squashed the fires."
Harris, 33, revealed to People magazine in November:
"I am happy to dispel any rumors or misconceptions and am quite proud to say that I am a very content gay man living my life to the fullest."
"My life had been relatively open in my world," he told Ellen DeGeneres, who is in a long-term relationship with Portia de Rossi and was one of the first major celebrities to go public with her homosexuality.
"I've been dating the same guy for three years and our families know. We go out together all the time but I just feel like as an actor part of your occupation is retaining a bit of mystery so you can be believable in many different types of roles, so I never felt it was an obligation for me to hold pinkies down the red carpet or anything."
Harris, who shot to fame as a teen doctor on Doogie Howser, M.D., now plays philandering Barney on CBS's How I Met Your Mother. His going public as a gay man follows similar admissions within the past year by Lance Bass and Grey's Anatomy star T.R. Knight.
"[Barney] is this crazy womanizer on the show, so I just didn't find [my sexual orientation] important," he said. "But other people did and I sort sensed this witch-hunt brewing."
Ultimately, Harris believes (and we agree), a decision to go public should rest with the individual - not with ass clown celebrity gossip generators like Perez Hilton.
"If someone doesn't want to talk about stuff or if someone has reason that they don't want to, I don't think they need to be criticized and chastised necessarily for that," Harris says, "Unless they're blatantly lying about things. I'm not such a fan of pushing people to make decisions."
Having gone public himself, Neil Patrick Harris knows it was the right choice.
"For me that is the greatest ending to the story so far. Nothing really has changed at all," he said. "I'm doing nothing different and people aren't behaving differently towards me. ... People heard and they're like yeah, and? That attitude, I think, was great."