Tab Hunter, the 1950s movie heartthrob who starred in "Damn Yankees" and "Battle Cry" and later became an icon in the gay community, died Sunday night, three days shy of his 87th birthday, Variety reported.

The news was announced on a Facebook page associated with the actor.

Hunter died Sunday night in Santa Barbara from a blood clot that caused a heart attack, Allan Glaser, his partner for more than three decades, told The Hollywood Reporter.

In addition to his acting career, Hunter had success in music with “Young Love,” which was named the No. 4 song of 1957 by Billboard. But rumors that he was gay dogged his career in an era where open homosexuality could end careers.

In 2005, Hunter confirmed the rumors about his homosexuality in his autobiography, “Tab Hunter Confidential: The Making of a Movie Star.”

In a 2015 interview with The Hollywood Reporter, Hunter said he wrote the book because he "didn't want someone putting a spin" on his life.

"I thought, 'Look, get it from the horse's mouth and not from some horse's ass after I'm dead and gone,'" he said.

Hunter wrote how studios attempted to mask his sexuality by linking him with co-stars and friends like Debbie Reynolds and Natalie Wood, Variety reported. The book spawned a 2015 documentary by Jeffrey Schwarz, which was also called "Tab Hunter Confidential."

In “Damn Yankees,” Hunter played Joe Hardy, a middle-aged Washington Senators fan who sells his soul to the devil in order to become a young baseball star and prevent the New York Yankees from winning another pennant. The film was an adaptation of the Broadway hit, a musical version of Douglass Wallop’s best-selling novel, “The Year the Yankees Lost the Pennant.”

Later in his career, Hunter starred in two films with drag queen Divine. He played Todd Tomorrow, a drive-in owner, in the 1981 comedy, "Polyester." The film introduced movie-goers to scratch-and-sniff cards, including "Model Building Glue," "Smelly Shoes" and Flatulence," according to The Hollywood Reporter. He also appeared with Divine in the 1985 film, "Lust in the Dust."

Hunter did summer stock and dinner theater during the 1960s, Variety reported. He also appeared in films during the 1970s and 1980s, including "The Life and Times of Judge Roy Bean" in 1972 and "Grease 2" in 1982.