Prince Andrew has hired a spin doctor to help mend his reputation — just as a documentary is set to air about the royal’s friendship with disgraced financier Jeffrey Epstein, according to a new report.

The Duke of York brought in Jason Stein, former special adviser to Amber Rudd — who served in Boris Johnson’s cabinet as the work and pensions secretary — as the palace braces for the hour-long program to air on the UK’s Channel 4 later this month, the Telegraph reported.

“The Duke’s office has got a huge volume of work to deliver but a great deal of time is being taken up dealing with Epstein-related inquiries, which is where Jason will come in,” a royal source told the outlet.

Stein, 28, whose official title will be “special adviser for communications,” accepted the role two weeks ago after Rudd resigned from her post over Johnson’s Brexit strategy, according to the report.

He will report to Prince Andrew’s private secretary, Amanda Thirsk, rather than to Buckingham Palace’s press office.

The Channel 4 current affairs team has reached out to various royal aides in an attempt to dig into why Prince Andrew stayed at the convicted pedophile’s sprawling Upper East Side mansion following his release in 2010, according to the Telegraph.

The duke claimed over the weekend that the scandalous trip was actually to end his decades-long friendship with Epstein — and a source close to the royal called the visit an “error of judgment.”

Andrew has always categorically denied “abhorrent” claims that he too had sex with any of the late pedophile’s victims.

“We don’t know how many times we can say we have got nothing to do with this,” the royal source told the Telegraph on Monday.

The documentary is set to air on Oct. 21.