Frank Kameny, the US gay rights campaigner, has died aged 86.

The activist, who was sacked from his government job as an astronomer in 1957 for being gay, was one of the leading lights of the US gay rights movement.

He was found dead on October 11th at his home in Washington. His friend Bob Witeck said a medical examiner found he had died of heart problems.

When the Army veteran was fired in 1957, he told he was “automatically a security risk” and a “disruptive personnel factor” because of his sexual orientation.

After appealing to his employers, Congress and the White House, he sued US Civil Service Commission.

He lost in lower courts but pursued his case to the Supreme Court, leading to the first civil rights claim based on sexual orientation to come before the court.

He later founded the Mattachine Society of Washington, one of the earliest gay and lesbian campaigning societies and became the first openly gay candidate for Congress in 1971.

In 1965, he and ten others held the first gay rights protest outside the White House.

He was associated with a number of gay rights victories, including the decision of the American Psychiatric Association to stop classifying homosexuality as a mental disorder and an order by President Bill Clinton to allow gay people security clearances.

In 2009, he received a formal apology from John Berry, the highest-ranking gay official in the Obama administration, on behalf of the federal government.

Mr Berry wrote that the dismissal, purely on the basis of sexual orientation, was “shameful”.

Joe Solmonese, president of the Human Rights Campaign, said Mr Kameny “led an extraordinary life marked by heroic activism that set a path for the modern LGBT civil rights movement”.

“From his early days fighting institutionalised discrimination in the federal workforce, Dr Kameny taught us all that ‘Gay is Good,’” Mr Solmonese said.

“As we say goodbye to this trailblazer on National Coming Out Day, we remember the remarkable power we all have to change the world by living our lives like Frank — openly, honestly and authentically.”