Prince William and his wife Kate Middleton have released a rare personal note following the death of BBC host Deborah James.

The 40-year-old British broadcaster, who raised millions for cancer research and was recognized by William for her work, died at age 40 following her battle with bowel cancer.

"We are so sad to hear the heartbreaking news about Dame Deborah," the Duke and Duchess of Cambridge tweeted on Wednesday. "Our thoughts are with her children, her family and her loved ones. Deborah was an inspirational and unfalteringly brave woman whose legacy will live on."

The message was signed off with the couple’s initials, indicating that the note came personally from them.

PRINCE WILLIAM REFLECTS ON HIS CONTROVERSIAL CARIBBEAN TOUR: ‘WE LEARNT SO MUCH’

James hosted a BBC podcast called "You, Me and The Big C" in which she spoke in a no-nonsense approach about living with bowel cancer. Her candid social media posts about her diagnosis and treatment, including videos of her dancing, garnered praise from the public.

She was diagnosed in 2016 and revealed in May that she was receiving end-of-life care at her parents’ home in Woking in southern England.

William, 40, personally conferred James' damehood in a surprise visit to the family home only days after she announced that she was receiving end-of-life care. He joined her and her family for an afternoon tea and champagne.

"Prince William actually came to our family house today!!" James wrote alongside the series of images on Instagram and shared how they spent the day. "I am utterly honoured that he joined us for afternoon tea and champagne, where he not only spent a generous amount of time talking to my whole family but also honoured me with my Damehood."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Kate Middleton Prince William

Prince William, Duke of Cambridge and Catherine, Duchess of Cambridge, mourn the passing of Deborah James. (Photo by Eddie Mulholland - WPA Pool/Getty Images)

In May, William also visited the Royal Marsden Hospital in London to meet with nurses and staff who helped care for James. The prince became president of the hospital in 2007. His late mother, Princess Diana, previously supported the facility and frequently made visits.

Dr. Nicos Fotiadis, who treated James, thanked William at the time for going to see her as it sent a "powerful" message.

"It is important to acknowledge and recognize people like Deborah who do such an awful lot to help other people in very difficult circumstances. She's done a brilliant job," William replied.

William joked, "As she put it, she made bowel cancer sexy, those are her words, not mine!"

KATE MIDDLETON SPORTS FULL MILITARY GEAR DURING VISIT TO BRITISH ARMED FORCES TRAINING ACADEMY

Prince William hospital

Prince William, Duke of Cambridge (L), President of The Royal Marsden NHS Foundation Trust, speaks to Dr. Nicos Fotiadis as he visits The Royal Marsden hospital to learn about some of the innovative work that is currently carrying out to improve cancer diagnosis and treatment on May 24, 2022, in London, England. (Photo by Frank Augstein - WPA Pool/Getty Images)

The prince also reflected on how James' legacy impacted him.

"I love Deborah, she's fantastic," said William. "Her legacy is massive. I was very honored to be able to speak to her. It felt like a very personal family moment that I was there for. It was a glorious day as well... She spoke very highly about her care. It was a touching moment... She is a brave and inspirational woman."

James died Tuesday surrounded by her family, including her husband and their two children, according to a family statement posted on Instagram.

James launched her podcast with two other cancer patients in 2018. She set up the Bowelbabe Fund for cancer research after announcing that her life was drawing to a close. The fund has raised nearly 7 million pounds ($8.5 million) so far — well over her initial 250,000-pound target.

QUEEN ELIZABETH II PHOTOG ON CAPTURING 'MOST FAMOUS WOMAN IN THE WORLD': SHE 'HUMANIZED IN FRONT OF ME'

Deborah James

Deborah James passed away on Tuesday surrounded by her family, including her husband and their two children. (Photo by Mike Marsland/WireImage)

British Prime Minister Boris Johnson hailed her work, saying in a tweet that "the awareness she brought to bowel cancer and the research her campaigning has funded will be her enduring legacy.

"Because of her, many many lives will be saved."

The Associated Press contributed to this report.