When Anthony Scaramucci and Reince Priebus met six years ago in the run-up to the 2012 presidential elections, the two were friendly.

But their relationship soured during President Donald Trump's transition after his election in 2016 as the two jostled for power.

Priebus, who was appointed chief of staff, told Trump that Scaramucci stood to profit from his proximity to the president in selling off his stake of the hedge fund SkyBridge Capital, according to sources who spoke to the Huffington Post.

Scaramucci, who in turn dubbed his nemesis 'Reince Penis' and 'Rancid Penis', tried to claw his way back into Trump's good graces through Jared Kushner and Stephen Bannon before settling on the president's longtime bodyguard, sources said.

But in a stunning turn of events, it appears Scaramucci got the last laugh, having finally been appointed communications director days before Priebus was ousted.

But Scaramucci's hell-bent path into the White House may have cost him his marriage, as his wife Deidre filed for divorce with a source telling the New York Post she grew 'tired of his naked ambition'.

Scroll down for video

Priebus (left), who was appointed chief of staff, told Trump that Scaramucci (right) stood to profit from his proximity to the president, according to sources who spoke to the HuffPo

Scaramucci (right), who in turn dubbed his nemesis 'Reince Penis' and 'Rancid Penis' (pictured left, Priebus), tried to claw his way back into Trump's good graces

In a stunning turn of events, it appears Scaramucci got the last laugh, having finally been appointed communications director days before Priebus was ousted (pictured, Trump)

Scaramucci was fundraising for Mitt Romney during his 2012 presidential bid when he met Priebus, who was the Republican National Committee chair at the time.

The two were cordial throughout Trump's campaign, but things took a turn once Trump was elected and Priebus was appointed chief of staff.

Scaramucci, who anticipated a smoother ascent into the White House in January, was ready to sell his stake in SkyBridge Capital to Chinese conglomerate HNA Capital and American investment firm RON Transatlantics.

But Priebus reportedly scuttled his chances, telling Trump that he had been 'played' by Scaramucci, according to the Huffington Post.

Priebus suggested the deal was a shady one - and that HNA Capital offered more for Scaramucci's stake in the company with the suggestion that favors would be expected in return once the financier was inside the White House, the HuffPo reported.

Scaramucci, who was anticipating a job in the public liaison office, was ultimately left out in the cold.

Scaramucci tried to enlist the help of both Jared Kushner (left) and Stephen Bannon (right)

Scaramucci finally found a way in through Trump's longtime bodyguard Keith Schiller (above), who put him on the phone with the president

But he was intent on finding a way back, enlisting the help of Trump's son-in-law, who tried to reassure the president on Scaramucci's behalf.

The 53-year-old then tried to worm his way into Trump's good graces through Bannon, but two people who spoke to the Huffington Post said the chief strategist already had his hands full trying to save Stephen Miller's job.

Scaramucci finally found a way in through Trump's longtime bodyguard Keith Schiller, who put him on the phone with the president.

Trump was sympathetic to Priebus' grievances, and offered to place him in a position as soon as he could.

When it emerged earlier July that Donald Trump Jr. met with a Russian lawyer during his father's presidential campaign, Scaramucci reportedly told the president that Priebus was the leaker, arguing that of all the leaks, none had targeted the chief of staff.

And when Scaramucci was named the communications director, it was notable that the White House announcement included the line: 'He will report directly to the president.'

Scaramucci had finally landed the job, and he called the New Yorker's Ryan Lizza on Wednesday night, accusing Priebus of being a leaker and a 'f****** paranoid schizophrenic'.

By Friday afternoon, Trump announced General John Kelly would be taking over Priebus' role of chief of staff. Pictured, Priebus in his first interview since the announcement

And by Friday afternoon, Trump announced General John Kelly would be taking over Priebus' role of chief of staff.

Scaramucci, while victorious in the feud with Priebus, may have suffered a personal loss, with his wife Deidre filing for divorce, it was revealed Friday.

'She is tired of his naked ambition, which is so enormous that it left her at her wits’ end,' according to one source who spoke to the New York Post.

Another source said that Scaramucci's new boss was also causing problems in the couple's relationship.

'Deidre is not a fan of Trump, and she hasn’t exactly been on board and supportive of Anthony and his push to get back into the White House,' said the second source.