Prince Harry made an appearance at a UK courtroom on Tuesday, when he swore to tell the truth in testimony against a tabloid publisher he accused of phone hacking.

The Duke of Sussex arrived at London’s High Court in a black SUV, passing by dozens of photographers and TV cameras. Inside, he held a Bible in one hand as he was sworn in. The 38-year-old is suing the publisher of the Daily Mirror.

The youngest son of King Charles III claimed the outlet used unlawful techniques on an "industrial scale" to get scoops on the British royal family. The father of two will face cross-examination by a lawyer for the defendant, Mirror Group Newspapers, which is contesting the claims.

Court sketch of Prince Harry in court speaking to a barrister

Court artist sketch by Elizabeth Cook of the Duke of Sussex (left) with his counsel David Sherborne (right) giving evidence at the Rolls Buildings in central London, with Justice Fancourt (center) looking on, during the phone hacking trial against Mirror Group Newspapers (MGN). A number of high-profile figures have brought claims against MGN over alleged unlawful information gathering at its titles.  (Elizabeth Cook/PA via Alamy)

The prince wore a dark suit and tie as he sat in the witness box. He told Mirror Group attorney Andrew Green that he had "experienced hostility from the press since I was born." Harry also accused the tabloids of playing "a destructive role in my growing up."

Prince Harry gets out of car at court

Britain's Prince Harry, Duke of Sussex, arrives to the Royal Courts of Justice, Britains High Court, in central London on June 6, 2023. (Henry Nicholls/AFP via Getty Images)

Harry is the first senior British royal since the 19th century to face questioning in court. His ancestor Prince Albert Edward, Queen Victoria’s eldest son who went on to become King Edward VII in 1901, appeared as a witness in a trial over a gambling scandal in 1891.

Harry has made it his life’s work to hold the UK press accountable for what he sees as its hounding of him and his family.

In a witness statement released just as he entered court, Harry said the UK tabloids were responsible for "inciting hatred and harassment" in his private life.

He described how his decision to move to California with Meghan Markle, a former American actress, was "due to the constant intrusion, inciting of hatred and harassment by the tabloid press into every aspect of our private lives, which had a devastating impact on our mental health and wellbeing."

PRINCESS EUGENIE'S NEWBORN BABY KNOCKS PRINCE EDWARD DOWN LINE OF SUCCESSION TO BRITISH THRONE

Meghan Markle in a white halter top-like tank top mid-smile looking off in the distance

Meghan Markle, an American actress, became the Duchess of Sussex when she married Prince Harry in 2018. (Karwai Tang/WireImage)

"We were also very concerned for the security and safety of our son," Harry added.

According to the prince, the "vile" behavior from the tabloids had him in a "downward spirit." He also said members of the royal family are "cast into a specific role by the tabloid press." As the "spare" to his brother Prince William, who is heir to the throne, he was cast as the "thicko," "cheat," "underage drinker" and "irresponsible drug taker."

"As a teenager and in my early 20s, I ended up feeling as though I was playing up to a lot of the headlines and stereotypes that they wanted to pin on me mainly because I thought that, if they are printing this rubbish about me and people were believing it, I may as well ‘do the crime’, so to speak," said Harry.

"It was a downward spiral, whereby the tabloids would constantly try and coax me, a ‘damaged’ young man, into doing something stupid that would make a good story and sell lots of newspapers," he explained. "Looking back on it now, such behavior on their part is utterly vile."

Prince Harry and Meghan Markle look serious in a photo

The Duke and Duchess of Sussex stepped back as senior royals in 2020. They now reside in California with their son Prince Archie and daughter Princess Lilibet. (Getty Images)

"I always felt as if the tabloids wanted me to be single, as I was much more interesting to them and sold more newspapers," he noted.

Harry was forced almost immediately to acknowledge that he couldn’t recall specific articles he was complaining about. Green pressed him on how they could have caused such distress if he couldn’t remember having read them at the time.

"It isn’t a specific article, it is all of the articles," Harry replied. "Every single article has caused me distress."

Green then asked Harry to identify what evidence he had of phone hacking in specific articles, and Harry said he’d have to ask that question of the journalist who wrote it. He repeatedly said that the manner in which information had been obtained was highly or incredibly suspicious.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Princess Diana wearing the lovers knot tiara in a white dress looks off camera

Prince Harry has long blamed the paparazzi for the death of his mother, Princess Diana. The Princess of Wales passed away in 1997 from injuries she sustained in a Paris car crash. She was 36. At the time, the royal was being chased by photographers. (Terry Fincher/Princess Diana Archive)

When asked how reporters could have hacked his phone for an article about his 12th birthday — a time when he admitted he didn’t have a mobile phone — Harry suggested they may have hacked his mother's phone.

"That’s just speculation you’ve come up with now," Green suggested.

In the same article, Green pointed out that a reference to him taking his parent’s divorce badly was obvious.

"Like most children I think, yes," Harry said.

But the prince said it was not legitimate to report such information and "the methods in which it was obtained seem incredibly suspicious."

Princess Dianas Panorama interview

Princess Diana is seen here being interviewed by Martin Bashir for the program "Panorama" in 1995. (© Pool Photograph/Corbis/Corbis via Getty Images))

Green then pointed out that his mother previously made public comments to reporters about the difficulties of her children after the divorce.

Setting out the prince’s case in court on Monday, his lawyer David Sherborne said that from Harry’s childhood, British newspapers used hacking and subterfuge to mine snippets of information that could be turned into front-page scoops.

According to Sherborne, stories about Harry were big sellers for the newspapers, and some 2,500 articles covered facets of his life during the time period of the case – from 1996 to 2011. The stories covered injuries at school, experimentation with marijuana and cocaine, as well as relationships with girlfriends.

PRINCE HARRY'S UK COURT SHOWDOWN: ROYAL FAILS TO SHOW UP FOR FIRST DAY, LEAVES JUDGE FRUSTRATED

Prince Harry gets out of car at court

Prince Harry is one of several claimants in a lawsuit against Mirror Group Newspapers related to allegations of unlawful information gathering in previous decades. (Leon Neal/Getty Images)

"Nothing was sacrosanct or out of bounds," said Sherborne.

In his written witness statement, Harry said he felt "as though the tabloid press thought that they owned me absolutely."

"I genuinely feel that in every relationship that I’ve ever had – be that with friends, girlfriends, with family or with the army, there’s always been a third party involved, namely the tabloid press," he said.

The Mirror Group has paid more than 100 million pounds ($125 million) to settle hundreds of unlawful information-gathering claims. It also printed an apology to phone hacking victims in 2015. However, the newspaper denies or has not admitted to any of Harry’s claims, which relate to 33 published articles.

Prince Harry in a dark grey suit and tie looks off to his left while walking into High Court

Prince Harry has made it his life's work to hold the UK press accountable. (Wiktor Szymanowicz/Anadolu Agency)

Green said there was "simply no evidence capable of supporting the finding that the Duke of Sussex was hacked, let alone on a habitual basis."

Green noted that he plans to question Harry for a day and a half.

Harry was expected in court on Monday for the opening of the hacking case. It is the first of his several lawsuits against the media to go to a full trial. However, Sherborne said the prince was absent because he had taken a flight on Sunday from Los Angeles after celebrating the birthday of his 2-year-old daughter, Princess Lilibet.

"I’m a little surprised," said Judge Timothy Fancourt concerning Harry’s absence, noting he directed the prince to be prepared to testify.

Prince Harrys book Spare on display at a store

Prince Harry detailed his fury against the British press in his memoir "Spare." (Lev Radin/Pacific Press/LightRocket)

Harry has detailed his fury against the UK press in his memoir "Spare," which was published in January of this year. He has also spoken out in several televised interviews.

PRINCE HARRY SAYS 400 PAGES CUT FROM BOOK 'SPARE' BECAUSE WILLIAM, CHARLES WOULD NEVER FORGIVE HIM

He has long blamed the paparazzi for causing the car crash that killed his mother, Princess Diana, in 1997. The 36-year-old died from injuries she sustained in Paris while being chased by photographers. He also harassment and intrusion from the UK press, as well as alleged racist articles, prompted him and his wife to leave the country.

The Duke and Duchess of Sussex stepped back as senior royals in 2020. They now reside in California with their two young children.

The Associated Press contributed to this report.