President Donald Trump played a central role in launching the 2005 criminal investigation of Jeffrey Epstein by the Palm Beach County Sheriff’s Office.

Michael Wolff, who was close with both men in the early aughts, writes in Fire and Fury that Epstein was outed to authorities soon after he threatened to expose Trump as a financial fraud.

It all started in 2004 when Epstein, who was still friends with Trump at the time, invited the real estate scion to see a foreclosed property in the tony enclave that he planned to purchase and then flip.

And it all ended with Trump pocketing more than $50 million in profits and Epstein behind bars, though both men did manage to negotiate sweet deals.

Scroll down for video

House hunters: Jeffrey Epstein informed President Trump (left in 2000 at Mar-a-Lago) of a real estate purchase he planned to make in 2004 claims Michael Wolff (Fire and Fury right)

Garbage home: He was trying to determine if he could move the pool on the property which he was prepared to bid $36 million for and then flip (property above pre-flip)

Epstein was planning to pay $36 million for the property, information he shared with Trump because he was certain the still-struggling developer would not be able to come up with the capital to submit his own bid.

That assumption proved to be wrong, and after learning of Epstein’s plan to list the home at a sizable profit million after renovations, Trump snapped up the oceanfront villa by bidding $5 million more than his pal.

He would list it for $125 million after minor renovations, which resulted in an enraged Epstein threatening to expose Trump.

It was shortly after making those threats that Epstein found himself under criminal investigation writes Wolff.

'Soon after negotiating the deal for the house in Palm Beach, Epstein took Trump to see it, looking for advice on construction issues involved with moving the swimming pool,' writes Woff.

'But as he prepared to finalize his purchase for the house, Epstein discovered that Trump, who was severely cash-constrained at the time, had bid $41 million for the property and bought it out from under Epstein through an entity called Trump Properties LLC, entirely financed by Deutsche Bank.

Local reports reveal that the two men did in fact battle it out at the auction, with Trump saying: 'I won't be living there because I already live in the best house in America.'

He later mentioned: 'I'm the largest developer in New York so this isn't a big deal to me.'

That claim is not true.

Property records confirm that an LLC with Trump’s name bought and then sold the massive mansion, and made a tidy sum in the process.

The property sold for $96 million, more than doubling Trump’s initial investment even after renovation costs.

Epstein was apoplectic and threatened to expose the precarious nature of Trump’s wealth.

'A furious Epstein, certain that Trump was merely fronting for the real owners, threatened to expose the deal, which was getting extensive coverage in Florida papers,' writes Wolff.

'The fight became all the more bitter when, not long after the purchase, Trump put the house on the market for $125 million.'

And Trump in turn helped usher in the PBCSO investigation by exposing Epstein's secrets.

'Just as the enmity between the two friends increased over the house purchase, Epstein found himself under investigation by the Palm Beach police,' writes Wolff.

'And as Epstein's legal problems escalated, the house, with only minor improvements, was acquired for $96 million by Dmitry Rybolovlev, an oligarch who was part of the close Putin circle of government-aligned industrialists in Russia, and who, in fact, never moved into the house.'

Trump likely had knowledge of the alleged criminal enterprise due to the fact that Epstein recruited from his private club.

Two Epstein victims claim they were approached while employees of the spa at Mar-a-Lago.

President Trump in turn banned Epstein from the club, but according to Wolff did not sever the friendship entirely until years later.

The sale of the home did later prove to be problematic for Trump when news of Russian meddling during the election came to light.

In 2016, it was torn down and divided into three lots that were each sold for over $30 million.

Gone: The property sold for $96 million to Dmitry Rybolovlev and in 2016 was torn down and made into three lots (above)

Divided: The three lots each sold for over $30 million and construction is underway on two (above)

Last week, producers at Morning Joe unearthed a video from 1992 which shows that Epstein was a guest of Trump's at Mar-a-Lago in November of that year and was surrounded by a group of models and cheerleaders.

It was one of Trump's final private parties before the financially-strapped real estate scion turned his residence into a members-only club.

Epstein brought his then-girlfriend Ghislaine Maxwell along for the outing, years before she would use the club as a hunting ground for underage girls according to court documents.

In one video, the women described in court documents as Epstein's pimp can be seen dancing behind Epstein and Trump as they assess the dozens of young females who had taken over the club that night.

'Look at her back there, she's hot,' Trump tells Epstein.

Epstein briefly feigns interest in the 'hot woman,' and soon after is seen doubling over with laughter when Trump whispers something in his ear.

President Trump insisted he wasn't friends with Epstein after he was arrested for sex trafficking.

'I had a falling out with him a long time ago. I wasn’t a fan. I was not a fan of his. That I can tell you,' he told reporters.

A majority of the footage shows Trump dancing with the bevy of beauties on hand that evening.

He even appears to kiss one, just a few months after finalizing his divorce from first wife Ivana Trump.

The kiss is a bit of shock given the fact that Trump clearly states that he is aware NBC is filming the footage.

He was dating Marla Maples at the time, though the two were famously on-and-off for years.

A few months after the video was shot she became pregnant with his fourth child, Tiffany.

There is no evidence that Epstein had been charged or even accused of a sex crime involving minors at the time of this party.