Prince Harry has lost an initial bid to appeal a High Court ruling over his security in the U.K.

On Monday, a High Court judge rejected his request to appeal an earlier ruling upholding a government panel’s decision to limit his access to publicly funded security. The Duke of Sussex lost his taxpayer-funded personal protective security after he gave up his status as a working member of the royal family in 2020.

The legal battle started more than four years ago, when the younger son of King Charles III claimed that he and his family were endangered when visiting his home country because of hostility toward him and his wife, Meghan Markle. The 39-year-old pointed out that the couple had been faced with ruthless hounding by the U.K. news media.

MEGHAN MARKLE, PRINCE HARRY PONDER POLITICS, DARE TO 'VOICE OPINIONS' ON WORLD STAGE: EXPERT

A close-up of Prince Harry in a navy suit and tie

Prince Harry argued that he and his family still need an armed security detail because of hostility directed toward him and his wife Meghan Markle on social media and relentless hounding by the news media. (Max Mumby/Indigo/Getty Images)

In response, a government lawyer said Harry had been treated fairly and was still provided protection on some of his visits. The lawyer cited a security detail that guarded the prince in June 2021, when he was chased by photographers after attending an event with seriously ill children in west London.

The committee considered the wider impact that the "tragic death" of his mother, the late Princess Diana, had on the nation, and in making its decision, gave greater weight to the "likely significant public upset were a successful attack" on her son to happen, attorney James Eadie said.

The glamorous mother of Harry and his older brother Prince William died in 1997 at age 36 in Paris. At the time, she was being chased by paparazzi.

Prince Harry and Meghan Markle share a kiss after a charity polo match.

Britain's Prince Harry and wife Meghan Markle, Duchess of Sussex, kiss as she presents his polo team with the trophy for winning the 2024 Royal Salute Polo Challenge to Benefit Sentebale on Friday, April 12, 2024, in Wellington, Florida. (AP Photo/Rebecca Blackwell)

In February, High Court Judge Peter Lane ruled that the panel’s decision, which provides for "bespoke" security on an as-needed basis, was not unlawful, irrational or unjustified.

"Insofar as the case-by-case approach may otherwise have caused difficulties, they have not been shown to be such as to overcome the high hurdle so as to render the decision-making irrational," Lane wrote in his 51-page ruling.

The panel decision was made by the Royal and VIP Executive Committee. The group is made up of members of the royal family staff, the Metropolitan Police, as well as several government offices.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Prince Harry and Meghan Markle at Invictus Games

The Duke and Duchess of Sussex stepped back as senior royals in 2020. They now reside in California. (Chris Jackson/Getty Images)

In most cases, U.K. plaintiffs do not have an automatic right to appeal, and they must seek permission from the original court before doing so.

The High Court said Monday it had rejected Harry’s initial bid for permission to appeal. However, he can now seek permission directly from the Court of Appeal.

A spokesperson for the Duke of Sussex did not immediately respond to Fox News Digital’s request for comment.

Markle, a former American actress, became the Duchess of Sussex when she married the British prince in 2018. They stepped down as working royals in 2020, citing what they described as unbearable intrusions and racist attitudes of the British media. The couple now resides in California.

Meghan Markle smiling

Meghan Markle starred in the legal drama "Suits" before she became the Duchess of Sussex in 2018. (Max Mumby/Indigo)

Harry’s lawyers previously said the prince was reluctant to bring the couple’s children, Prince Archie, 4, and Princess Lilibet, 2, to the U.K. because it is not safe.

Harry argued his private security team in the U.S. does not have adequate jurisdiction abroad or access to U.K. intelligence information. His lawyers also said that removing his full royal security was unreasonable because Harry was not allowed to make "informed representations beforehand."

The British government said the committee’s decision was reasonable, and it is not possible to pay privately for police protection.

CLICK HERE TO GET THE FOX NEWS APP

Close up of Prince Harry

According to reports, Prince Harry is heading back to London on May 8 to commemorate the 10th anniversary of the Invictus Games. (Lukas Schulze/Getty Images for Invictus Games Düsseldorf 2023)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Page Six reported that the prince is headed to London next month and is scheduled to speak at a special service marking the 10th anniversary of the Invictus Games at St. Paul’s Cathedral on May 8. A spokesperson did not immediately respond to Fox News Digital’s request for comment.

Modeled after the Warrior Games in the United States, Harry founded the Invictus Games in 2014 as a Paralympic-style event designed to inspire military veterans around the world as they work to overcome battlefield injuries. Harry was a former captain in the British Army.

The outlet reported that the Invictus Games were created when the royal was patron of The Royal Foundation of The Duke and Duchess of Cambridge and Prince Harry. It was the charitable organization shared by the royal brothers and William’s wife, Kate Middleton.

The Associated Press contributed to this report.