In a perverse twist of medical fate, Farrah Fawcett has become the poster girl for anal cancer, a rare disease often linked to a sexually transmitted virus.

Before her death last week, at age 62, the actress had come to terms with the illness and agreed to have her suffering and treatment chronicled for a television documentary.

“She knew that she had the kind of anal cancer that she wasn’t going to ultimately overcome, and decided to leave as much of a legacy of awareness as she possibly could,” her physician, Dr. Lawrence Piro, said Tuesday before her funeral.

It is an unexpected legacy for Fawcett, whose feathered hair and electric smile once dominated TV screens. A sexy photo of her in a red swimsuit, taken in the 1970’s, was the top-selling pinup of all time. Despite her fame and work as an entertainer, friends say she was protective of her privacy.

But she was stricken by anal cancer, a rarely discussed affliction with symptoms that are sometimes mistaken for hemorrhoids. After tabloids began reporting on her illness, her family acknowledged it and a friend produced Farrah’s Story, a documentary aired in May that showed Fawcett’s treatment and suffering.

It was important new information for people unfamiliar with the disease or reluctant to even talk about it, some health officials said.