Anderson Cooper has confirmed what most people in the media world and New York already knew: He is gay.

"The fact is, I'm gay," Cooper wrote in an email to Daily Beast blogger Andrew Sullivan. "Always have been, always will be, and I couldn't be any more happy, comfortable with myself, and proud."

Sullivan, who is gay and is a longtime friend of Cooper's, had asked the CNN anchor for his reaction to a recent Entertainment Weekly story—"The New Art of Coming Out"—which was, in part, about the importance of gay celebrities coming out of the closet to combat America's bullying epidemic.

"Andrew, as you know, the issue you raise is one that I've thought about for years," Cooper responded. "Even though my job puts me in the public eye, I have tried to maintain some level of privacy in my life. Part of that has been for purely personal reasons. I think most people want some privacy for themselves and the people they are close to."

[Related: Is there a right way to come out?]

"But I've also wanted to retain some privacy for professional reasons," Cooper continued. "Since I started as a reporter in war zones 20 years ago, I've often found myself in some very dangerous places. For my safety and the safety of those I work with, I try to blend in as much as possible, and prefer to stick to my job of telling other people's stories, and not my own. I have found that sometimes the less an interview subject knows about me, the better I can safely and effectively do my job as a journalist. I've always believed that who a reporter votes for, what religion they are, who they love, should not be something they have to discuss publicly."

Cooper said he did not come out in his 2006 memoir, "Dispatches from the Edge," because the book was meant to be about war and not about his personal life. But his thinking has since changed:

Recently, however, I've begun to consider whether the unintended outcomes of maintaining my privacy outweigh personal and professional principle. It's become clear to me that by remaining silent on certain aspects of my personal life for so long, I have given some the mistaken impression that I am trying to hide something—something that makes me uncomfortable, ashamed or even afraid. This is distressing because it is simply not true.

Story continues

While it's the first time Cooper has been on the record about his sexuality, it's been an open secret in the media and gay communities for years. In 2007, for example, Out magazine put Cooper on its list of the 50 most powerful gays. In 2011, Cooper gave a winking nod to his homosexuality during a panel discussion with writers from The Onion.

And last month, Cooper was among the celebrities featured in a New York Observer cover story on "the glass closet."

"In a perfect world, I don't think it's anyone else's business, but I do think there is value in standing up and being counted," Cooper—who says he's always been open with family and friends—added in his email. "Visibility is important, more important than preserving my reporter's shield of privacy."

Gay groups quickly applauded Cooper's courage.

"Our members share his sentiment that as journalists, not activists, we have a significant role to play as advocates for fair and accurate coverage of the LGBT community in the mainstream media," David Steinberg, president of the National Lesbian & Gay Journalists Association, said in a statement to Yahoo News. "We have worked hard to ensure that all journalists are comfortable being out in the newsroom and having it not be perceived as detrimental to their ability to do their job."

[Related: Facebook adds same-sex icons for couples]

Cooper's announcement "helps us move 'what shouldn't matter' closer to 'what doesn't matter,'" actor Michael McKean tweeted.

"Anderson Cooper wasn't in the closet," Tina Dupuy wrote on Twitter. "He was in the none-of-your-business."

Not everyone, though, celebrated the manner of Cooper's announcement. Gawker Media chief Nick Denton, who is openly gay, tweeted: "Anderson Cooper: you seek 'visibility' and [yet] bury your coming-out announcement."

"Anderson Cooper would have come out of the closet sooner but being on CNN prevented him from accurately breaking a news story," joked Comedy Central's Indecision Twitter feed.

While Cooper is certainly the most prominent news personality to announce he's gay, he isn't the first—even at CNN. Last year, weekend and daytime anchor Don Lemon came out of the closet in a memoir titled "Transparent."