(CNN) On August 19, Buckingham Palace put out a statement signed by Prince Andrew, the Duke of York, that was emphatic in distancing the British Royal from the late disgraced financier, Jeffrey Epstein.

"His Royal Highness deplores the exploitation of any human being and the suggestion he would condone, participate in or encourage any such behavior is abhorrent," it said in part

The statement came days after The Mail On Sunday published grainy video footage that the British paper said showed the prince at the door of Epstein's Manhattan townhouse in 2010.

By then Epstein was a registered sex offender who had avoided a federal trial at the time and served only 13 months in jail for state prostitution charges over his involvement with underage girls. He was accused of paying hundreds of dollars in cash to girls as young as 14 to have sex with him at his Upper East Side home and his estate in Palm Beach, Florida, and paid some of his victims to recruit other girls for him to abuse.

In 2015, one of Epstein's accusers, Virginia Roberts Giuffre, said in a federal court filing that she was forced to have sex with the prince while underage. Prince Andrew has "emphatically denied" any sexual contact with Virginia Roberts.

While the statement was intended to clarify the details of a relationship that had plagued the British prince for almost a decade, the reality is that it had ended years earlier in a dramatic chain of events, some of which have never been told before.

The more than decade-long friendship between Prince Andrew and Epstein, who died by suicide in his jail cell on August 10, ended in the Spring of 2011, when Epstein threatened legal action against Prince Andrew's ex-wife Sarah Ferguson, the Duchess of York.

According to interviews with three people with direct knowledge of the events, Epstein grew irate in late February 2011 after the New York Post published a photograph of the prince walking in Central Park with Epstein in late December 2010.

The accompanying article , headlined "Prince & Perv," generated a barrage of negative publicity about the prince's years-long friendship with Epstein. On March 7, 2011, Sarah Ferguson admitted publicly that she had accepted GBP 15,000 ($24,000) from Epstein to help pay an employee to whom she owed money.

On the advice of her publicist, James Henderson, the Duchess gave an interview to London's Evening Standard in which she expressed extreme contrition for her lack of judgment by accepting the funds from Epstein. With the interview, she put a clear divide between herself and Epstein. "I abhor pedophilia," she said, adding that she'd had no knowledge of Epstein's alleged relationships with under-age girls when she took the money.

According to Henderson, Epstein's reaction to Ferguson's statement was swift and dramatic. First Henderson received what he described as a "deeply unpleasant" phone call from Epstein, who threatened Henderson with a defamation lawsuit if a statement was not issued retracting the word "pedophile."

"It was so unpleasant that I was left slightly rattled and I saved his number so I'd never have to take a call from him again," Henderson told CNN.

Next, the Duchess received a letter threatening legal action from an Epstein lawyer and demanding a retraction, according to Henderson. The letter was sent to Ferguson's lawyer at Schillings in London, according to Henderson, who says he advised the Duchess not to retract her statement.

Shortly after, Epstein, who had retained the services of Los Angeles publicity firm Sitrick & Company years earlier, now turned to Sitrick for help with the situation. The head and founder of the firm, Michael Sitrick, said he in turn recommended that Epstein hire a new lawyer, the UK defamation attorney Paul Tweed.

That solution didn't work. Sitrick ended up suing Epstein for failing to pay his bills, and Tweed eventually stopped working for him as well. Tweed told CNN that he stopped working on the matter after "my advices were not acceptable to Epstein."

According to court documents related to Sitrick's lawsuit against Epstein and obtained by CNN, Sitrick's employees, in consultation with Tweed, tried to construct language to propose to Fergie that would serve as some sort of retraction by the Duchess of York.

At one point, Henderson says he was shown a draft statement that asked for a retraction of every single one of the Duchess's comments.

Ultimately, it was all for naught. On Henderson's advice, the Duchess never retracted her statements. Records show that in 2014 Sitrick sued Epstein for payment of more than $71,000 in unpaid bills and received a default judgment in his favor.

In a bit of irony, while the incident marked the end of the relationship between Epstein and Prince Andrew, it also led to a friendship between Tweed and the former royal couple. Tweed was photographed last week golfing with Prince Andrew.

The Duchess had been so impressed by his tenacity in 2011 she wound up hiring him a few years later, according to Henderson.

However, the Epstein issue has continued to plague the Duke of York, especially since the Giuffre allegations became public in 2015. (A photograph of the Duke with his arm around Giuffre's waist allegedly taken in 2001 first surfaced in Britain's Mail on Sunday in 2011.)

A photograph appearing to show Prince Andrew with Jeffrey Epstein's accuser Virginia Roberts Giuffre and, in the background, Ghislaine Maxwell.

A federal judge has ruled that some documents related to the case could be unsealed

Lawyers for Giuffre have asked for a meeting with the Duke to explore his relationship with Epstein. He did not answer their requests, according to Giuffre's lawyers. Buckingham Palace reiterated its statement that Prince Andrew had never had any form of sexual contact with Giuffre.

On Friday, September 20, Giuffre reiterated her allegations about Prince Andrew on NBC's Today Show , where she appeared with five other alleged Epstein victims. In the segment, Giuffre recounts an incident in which she went out to a club in London with Epstein, his close friend Ghislaine Maxwell, and Prince Andrew. In the car ride back from the club, Giuffre said that Maxwell told her the prince was coming back to her house and that she wanted her to "do for him what you do for Epstein."

"I just couldn't believe it," Giuffre Roberts told NBC. "I couldn't believe that even royalty were involved."

In a statement to CNN, Buckingham Palace said that "It is emphatically denied that the Duke of York had any form of sexual contact or relationship with Virginia Roberts. Any claim to the contrary is false and without foundation."