Prince Harry can now take the British government to court over his security arrangements, a judge in London ruled. 

When Harry and wife Meghan Markle gave up their status as senior royals and moved to California in 2020, they lost publicly funded U.K. police protection. 

The Duke of Sussex now wants to pay for his own police security for when he visits his family in Britain and is challenging the government’s refusal to allow it.

Prince Harry and Meghan Markle

Prince Harry and Meghan Markle asked to pay for their own security, and the government denied their request. (Michael M. Santiago/Getty Images)

A hearing can now take place at the High Court in London, after Judge Jonathan Swift ruled in Prince Harry's favor Friday. Some parts of Harry's arguments were dismissed, but Judge Swift determined his case deserved to be heard.

ADAM CAROLLA RIPS PRINCE HARRY FOR BASHING AMERICA IN UNITED NATIONS ADDRESS: 'COLOSSAL BLOWHARD'

The judge said "a conclusion at the permission stage that a case is arguable is some distance from a conclusion that the case will succeed at final hearing." 

While he has been granted permission to sue the U.K. government, it's far from going to trial.

Harry and Meghan

Prince Harry and Meghan Markle lost their security in the U.K. when they gave up their titles and moved to California. (Getty)

Harry and Markle were married in 2019 at Windsor Castle and stepped down as working royals in 2020 in what came to be known as "Megxit." In their decision, they cited the media's treatment of the Duchess of Sussex as the primary reason, claiming they constantly published lies about her and demonstrated racist attitudes.

Their lawyers went as far as saying Harry and Meghan are hesitant to bring their children — Archie, 3, and Lilibet, 1 — to the U.K. because they don't feel safe without proper security detail.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

The Duke of Sussex is asking permission to pay for his own security, saying a separate security team in the U.K. is necessary because his private security team in the U.S. doesn’t have jurisdiction abroad or access to U.K. intelligence information.

Harry and Meghan wedding

Harry and Meghan got married in 2019 and moved to California a year later. (Getty Images)

His lawyers also say a February 2020 decision by the Executive Committee for the Protection of Royalty and Public Figures removing his full royal security was unreasonable because Harry was not allowed to make "informed representations beforehand."

CLICK HERE TO GET THE FOX NEWS APP

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

The Associated Press contributed to this report