Image copyright Reuters Image caption Mr Cook said he made his announcement to try to help people struggling with their identity

Apple chief executive Tim Cook has publicly acknowledged his sexuality, saying that he is "proud to be gay".

Mr Cook made his announcement to try to help people struggling with their identity, he wrote in a Bloomberg Businessweek article.

He has been open about his sexuality, but has also tried to maintain a basic level of privacy until now, he said.

This week Mr Cook challenged his home state of Alabama to ensure the rights of gay and transgender people.

Privacy trade-off

"While I have never denied my sexuality, I haven't publicly acknowledged it either, until now," he wrote.

Media playback is unsupported on your device Media caption Former BP chief executive Lord Browne says Mr Cook is "an important role model"

"So let me be clear: I'm proud to be gay, and I consider being gay among the greatest gifts God has given me," he added.

He said he didn't consider himself an activist, but that he realised he had "benefited from the sacrifice of others."

"So if hearing that the CEO [chief executive] of Apple is gay can help someone struggling to come to terms with who he or she is, or bring comfort to anyone who feels alone, or inspire people to insist on their equality, then it's worth the trade-off with my own privacy," he added.

Mr Cook said that he had been open about his sexuality with many people, including colleagues at Apple, but that it still "wasn't an easy choice" to publicly announce his sexual orientation.

He quoted civil rights campaigner Martin Luther King, saying: "Life's most persistent and urgent question is, 'What are you doing for others?' "

Analysis

Rory Cellan-Jones, BBC News technology correspondent

Tim Cook's announcement may come as no surprise in Silicon Valley or across corporate America.

But that does not mean that we should underestimate the significance of the leader of the world's most valuable company talking openly about his sexuality.

Back in May, a piece in the New York Times asked "where are the gay chief executives?" and struggled to name any openly gay CEOs at America's 1,000 biggest companies.

Apple under Steve Jobs was not a company that took a stand on any issues which were not seen as relevant to its business.

Tim Cook has been more forthcoming on all sorts of issues, including equal rights for gay workers, and while he says he does not see himself as an activist, that is how many will now see him.

That could embroil him in controversy in the United States, let alone in other parts of the world with less liberal views of sexuality.

Mr Cook admitted that going public as a gay man was not an easy choice - but it certainly looks a courageous one.

This week Mr Cook referred to Martin Luther King in a speech in Alabama in which he called for equal rights for people based on sexual orientation and identity.

He said that Alabama had been too slow to ensure the rights of ethnic minorities in the civil rights era, and was now being too slow to guarantee gay rights.

"Under the law, citizens of Alabama can still be fired based on their sexual orientation," Mr Cook said.

"We can't change the past, but we can learn from it and we can create a different future."

Mr Cook has championed equality at Apple, but in August said he was "not satisfied" with workforce diversity at the company.

Outstanding, a not-for-profit professional network for lesbian, gay, bisexual and transgender (LGBT) executives, said on Thursday that many LGBT people in the UK felt it was "safer to stay in the closet" when at work.

In May a US study by LGBT organisation Human Rights Campaign suggested that 53% of US LGBT employees had not come out at work.

'Role model'

Former BP chief executive Lord Browne, who now chairs fracking company Cuadrilla, said Mr Cook had become a role model.

"By deciding to speak publicly about his sexuality, Tim Cook has become a role model, and will speed up changes in the corporate world," Lord Browne said.

The peer kept his sexual orientation a secret for decades, but was forced to come out after a boyfriend made his sexuality public in 2007.

Lord Browne later resigned after losing a court battle with a newspaper.