LONDON — Britain’s Prince Andrew insisted he does not recall meeting the woman who has accused him of having sexual encounters with her when she was 17 at the behest of financier Jeffrey Epstein.

In an extraordinary interview conducted at Buckingham Palace with the BBC Newsnight program and aired on Saturday, the third child of Queen Elizabeth II said he had “no recollection of ever meeting this lady, none whatsoever,” when asked about Virginia Roberts, now Virginia Giuffre.

Andrew’s close relationship with Epstein, a convicted sex offender who committed suicide in a New York jail cell in August, has deeply embarrassed Britain’s royal family. Until now, Andrew — the Duke of York — and the royal family have only reluctantly addressed the charges in terse statements issued from the palace.

In the hour-long interview, the 59-year-old divorced prince was asked politely but repeatedly on camera by journalist Emily Maitlis about an alleged sexual encounter with a teenager, how much he sweats, and how he could have spent four days at Epstein’s New York City mansion after Epstein was convicted of soliciting a minor.

Andrew told the broadcaster that he failed to live up to the high standards of the royal family by staying at Epstein’s mansion in New York City in 2010, when Epstein was already a registered sex offender.

The senior royal’s friendship with Epstein was thrown back into the spotlight this summer after court documents were released in a related defamation case. In those documents, Giuffre accused Andrew of having sex with her three times — in London, New York and the U.S. Virgin Islands. She said she was paid by Epstein for those encounters.

Giuffre said that in 2001 in London, she dined with the prince, danced with him at the Tramp nightclub and had sex with him at the home of one of the prince’s friends in the Belgravia neighborhood of London.

“I can absolutely categorically tell you it never happened,” Andrew said.

Andrew said there were a “number of things that are wrong” with Giuffre’s story.

He said that he had no recollection of meeting her and that when she claimed they had sex, on March 10, 2001, he was at home after a pizza party. He recalled taking his daughter Beatrice to a Pizza Express, a restaurant chain, for a party that day. And then, because Beatrice’s mother and his former wife, Sarah Ferguson, was away, he looked after the children. “We have a simple rule in the family that when one is away the other one is there,” he said.

Giuffre has offered specifics about their alleged encounter. She said that when they went dancing, the prince sweated profusely.

But Andrew said that he wasn’t able, at that time, to perspire. “I didn’t sweat at the time because I had suffered what I would describe as an overdose of adrenaline in the Falklands war when I was shot at, and I simply . . . it was almost impossible for me to sweat,” he said.

Giuffre has also produced a photograph of the prince, smiling, with his arm around her bare waist. In the background is Ghislaine Maxwell, Epstein’s former girlfriend who accusers say served as his enabler, procuring teens and young women to give massages to Epstein that became sexual.

“I have absolutely no memory of that photograph ever being taken,” the prince told the BBC.

Andrew then suggested that the photograph could have been altered. “From the investigations that we’ve done, you can’t prove whether that photograph is faked or not because it is a photograph of a photograph of a photograph.”

The prince said he doesn’t think the photograph could have been taken in London because “when I go out in London, I wear a suit and a tie.”

Andrew said he would not have put his arm around anyone, as “I am not one to, as it were, hug, and public displays of affection are not something that I do.”

Andrew, the brother of Prince Charles and eighth in line to the British throne, told the BBC that he regrets staying at Epstein’s home after Epstein had been convicted in Florida in 2008 on two charges of felony prostitution.

Staying at Epstein’s home after his release from prison was something “I kick myself for on a daily basis because it was not something that was becoming of a member of the royal family. And we try and uphold the highest standards and practices, and I let the side down, simple as that.”

This summer, British newspapers published video footage taken in 2010 of Andrew peering out from behind a door at Epstein’s house in New York City and waving goodbye to a woman.

When pressed on why he was at Epstein’s mansion, Andrew said it was a “convenient place to stay.”

“I mean, I’ve gone through this in my mind so many times. At the end of the day, with a benefit of all the hindsight that one can have, it was definitely the wrong thing to do.

“But at the time I felt it was the honorable and right thing to do, and I admit fully that my judgment was probably colored by my tendency to be too honorable, but that’s just the way it is,” he said.

When asked whether the episode has been damaging to the queen, Andrew said, “I don’t believe it’s been damaging to the queen at all.” He said that “it has to me,” but that he also didn’t fully regret the friendship because it had some “seriously beneficial outcomes” separate from the allegations.

“Do I regret the fact that he [Epstein] has quite obviously conducted himself in a manner unbecoming? Yes,” Andrew said.

Maitlis, the interviewer, responded: “Unbecoming? He was a sex offender.”

“Yeah, I’m sorry. I’m being polite,” the prince answered.