Former pro-basketball player Jason Collins, the first active male athlete in a major American professional team sport to come out as gay, has announced that he has been diagnosed with an aggressive form of brain cancer.

Collins was diagnosed with stage four glioblastoma, he wrote in an article for sport broadcaster ESPN on Thursday, and is currently undergoing treatment to stop the spread of his inoperable disease.

The brain tumour, he says, is like "a monster with tentacles spreading across the underside of my brain the width of a baseball".

Without treatment, he would be dead within three months, doctors told Collins.

Collins, who played for 13 seasons in the NBA, wrote that the challenges of treatment were somewhat similar to those he faced on the court.