Royal fans were shocked to find a notice that Prince Philip has died following his health battle on the website for train company TransPennine Express.

The announcement of the 99-year-old royal's death popped up on the site on Thursday last week. It read, "We are saddened by the death of His Royal Highness The Duke of Edinburgh." The announcement later became viral on social media after a few concerned citizens shared a screenshot and asked the train company for an explanation.

"Why have you got on your website that the Duke of Edinburgh has passed away?" one netizen asked, to which a representative for TPE replied, "Hi Paul, we are aware of this error on our website and we are working as quickly as possible to rectify this."

Another individual raised the same concern and received a reply that the company is working to get the announcement removed as soon as possible.

Hi Richard, We are working on getting this removed as we speak. It has just been reported to us. Thanks ^SO

— TPE Customer Assist (@TPEassist) March 4, 2021

Another user called the notice "appalling" to which the spokesperson replied, "Hi Andy, Sorry if this has caused any upset. It was removed as soon as we were made aware of it."

It's clearly not deliberately meant, there's presumably been some error or hack, it's not the end of the world.

— Richard Smith (@richardavsmith) March 4, 2021

Hi Richard, Thank you for your kind words. Hopefully no upset has been caused to yourself. It was removed as soon as it got reported to us. ^SO

— TPE Customer Assist (@TPEassist) March 4, 2021

"Distressed isn't even the word, I was finishing off my Duke of Edinburgh scheme when I saw this awful tweet about Prince Philip, at first I was raw with emotion & then to find it's untrue I do sincerely hope a thorough investigation will be launched to catch the culprit," another tweeted.

According to the Edinburgh Live, the erroneous announcement on Prince Philip's death was up on the train company's website for 30 minutes. It is unclear how it happened but the company is said to be investigating the matter. A representative for TransPennine Express has also since issued an apology for the misinformation.

"Earlier this evening, a statement was mistakenly published to our website saying a member of the Royal Family had passed away. As soon as we became aware of this error, we removed the statement and we would like to apologise for any distress that this may have caused," read the statement posted on Twitter.

Earlier this evening, a statement was mistakenly published to our website saying a member of the Royal Family had passed away. As soon as we became aware of this error, we removed the statement and we would like to apologise for any distress that this may have caused. (Part 1)

— TPE Customer Assist (@TPEassist) March 4, 2021

Continued.....We are now conducting an investigation into how this occurred. (Part 2)

— TPE Customer Assist (@TPEassist) March 4, 2021

Prince Philip recently underwent successful surgery for his pre-existing heart condition. He is said to be in recovery at St. Bartholomew's Hospital in London.

Prince Philip
Prince Philip, the Duke of Edinburgh, is expected to remain in hospital for a few days of observation and rest, Buckingham Palace said Photo: POOL / Adrian DENNIS