Sarah Ferguson, the former wife of Britain's Prince Andrew, has been diagnosed with malignant melanoma, her spokesman has said.
The disease was discovered after several moles were removed when she was treated for breast cancer in June.
One of the moles was found to be cancerous and doctors are working to establish if it was caught early.
The 64-year-old is understood to be recovering at home surrounded by family.
She is said to be in “good spirits” despite the fact another cancer diagnosis so soon after the last one has been “distressing”.
Her spokesman said: “Following her diagnosis with an early form of breast cancer this summer, Sarah, Duchess of York has now been diagnosed with malignant melanoma.
“Her dermatologist asked that several moles were removed and analysed at the same time as the Duchess was undergoing reconstructive surgery following her mastectomy, and one of these has been identified as cancerous.
“She is undergoing further investigations to ensure that this has been caught in the early stages.
“Clearly, another diagnosis so soon after treatment for breast cancer has been distressing but the Duchess remains in good spirits.
“The Duchess wants to thank the entire medical team which has supported her, particularly her dermatologist whose vigilance ensured the illness was detected when it was.
“She believes her experience underlines the importance of checking the size, shape, colour and texture and emergence of new moles that can be a sign of melanoma.”
Earlier this week it emerged the Princess of Wales is recovering in hospital after having abdominal surgery while the King will be treated for an enlarged prostate next week.
In June, the duchess’s breast cancer was found at an early stage during a routine mammogram and she had an operation at London’s King Edward VII’s Hospital, which has treated the royal family for decades.
Melanoma skin cancer can spread to other parts of the body, according to the doctors.
Its “main cause” is ultraviolet light, which comes from the sun and is used in sunbeds.
Symptoms include having a new mole or changes to an existing one.
If a mole is larger than normal, has an uneven shape or is a mix of colours it could be a sign someone has the condition.
Surgery is the main treatment for malignant melanoma, especially if it is found early, but advanced melanoma can be hard to treat.
The duchess is a patron of the Teenage Cancer Trust and spoke at a Breast Cancer Foundation gala in 2019.
Her elder daughter Princess Beatrice is patron of the British Skin Foundation and has worked with skin cancer patients.