With less than three weeks until Election Day, Donald Trump is dipping in the polls and struggling to get out of a dismal news cycle focused on allegations of sexual assault and a damning audio recording that caught him boasting about grabbing women’s genitals.

But as New York magazine’s Gabriel Sherman revealed on stage at the Vanity Fair New Establishment Summit on Wednesday morning, Trump has lost one key ally: Roger Ailes. The former Fox News boss had reportedly served as an advisor to Trump throughout the campaign. He was said to have played a particularly important role as of late, helping him prepare for the presidential debates.

That's all changed now, according to Sherman and Vanity Fair contributing editor Sarah Ellison. The reason for the fallout depends on who you ask.

“Ailes’s camp said Ailes learned that Trump couldn’t focus—surprise, surprise—and that advising him was a waste of time,” Sherman said. “These debate prep sessions weren’t going anywhere.”

On the Trump side, Ellison said the story is different: “Even for the second debate, Ailes kept going off on tangents and talking about his war stories while he was supposed to be prepping Trump.”

News that Ailes was advising Trump was met with outrage over the summer, as Ailes himself was mired in his own sexual harassment scandal. He resigned in July over allegations that he harassed more than two dozen women. Ailes categorically denied the accusations, though Fox News settled with at least three of his alleged victims, including a $20 million agreement with Gretchen Carlson. The Ailes/Trump falling out comes as Trump faces allegations of his own (which the billionaire has also denied).

The drama was juicy enough to garner a T.V. deal for Sherman, who announced on stage that he will be working on a limited series based on the Ailes saga. The project, which does not yet have a title, has not cast any actors yet. But when Ellison asked Sherman who could possibly play the one-time conservative kingmaker, he had some ideas.

“Anthony Hopkins in the Hitchcock Film was a spitting image,” he said, while also floating John Goodman as a possibility.

A representative for Trump did not immediately respond to a request for comment. Susan Estrich, a representative for Ailes, said that he and Trump have been friends for 35 years but he was never an official advisor. “Roger has never attended any debate prep meetings and has not been advising him on debates.”

The news came just after the two-day event, presented by Vanity Fair in association with the Aspen Institute, kicked off in San Francisco. Leaders in business, technology, media, and entertainment, will discuss finding the next billion dollar idea, how man and machine will interact, and an inside look at Amazon, Disney, and Uber from the executives who run them.