A former royal protection officer is trashing Prince Andrew’s alibi for the key night in his Jeffrey Epstein sex-trafficking scandal — and launching a legal fight to prove it, according to a report Sunday.

The disgraced Duke of York claimed that he was with his daughters at a pizza restaurant and then home all night on the 2001 date accuser Virginia Roberts Giuffre claims she was first forced to have sex with him.

But a “highly respected” former royal cop has told the Mail on Sunday that he clearly recalls the prince instead coming home to Buckingham Palace in the middle of the night and hurling “abuse” at Palace guards.

The former cop told the UK paper that he just wants “to see justice done,” and is willing to speak to lawyers fighting for the accusers.

He is also launching a legal bid via data protection and freedom of information laws to access his shift roster and other documents to confirm it was the same night in 2001 that Giuffre says she slept with the royal at alleged madam Ghislaine Maxwell’s London house.

London’s Metropolitan Police previously rejected a newspaper’s legal bid to trace Andrew’s bodyguards’ movements that night.

“Having considered Prince Andrew’s alibi with my own recollections, it is my belief that the abusive confrontation with the royal could have been in the early hours of Sunday March 11, 2001,” the officer told the paper.

“To be 100 percent certain, I would like access to my duty roster for that month. I believe I have a right to know my own shift patterns,” he said.

Giuffre has repeatedly said it was the night she was first forced by Epstein to have sex with Andrew, when she was just 17. It is also when the now-notorious photo of her with the royal is said to have been taken.

When Andrew gave his alibi during his disastrous BBC interview last year, it was assumed he meant he had stayed home with his daughters at the family home of Sunninghill Park, about 10 miles from the pizza restaurant.

If the officer is correct, he was actually out that night — and returned instead to the palace, the other side of London.

It stood out because Andrew was “shouting abuse through the radio” while flashing his car light to be let into the palace, the former cop with an “exemplary” record claimed.

“The abuse I remember was phrases such as, ‘Open these bloody gates, you buffoons! Get these bloody gates open!'” he told the paper, calling it ‘belittling.'”

“After seeing the BBC interview, it dawned on me that the abusive incident I experienced could cast doubt on Prince Andrew’s alibi if it were the same night,” he told the Mail on Sunday.

Lisa Bloom, an attorney for several of Epstein’s victims, said she would be “delighted to speak with the officer.”

“It is now more imperative than ever that Prince Andrew does as he promised and cooperates with the FBI’s investigation,” she told the Mail.

A spokeswoman for Metropolitan Police told London’s Evening Standard that the former officer is “entitled to submit his subject access request which will then be considered.”

“We are not prepared to discuss records that we may or may not hold regarding matters of protection. We are not conducting a criminal investigation,” the spokeswoman added.

Andrew has always strenuously denied any wrongdoing or having sex with Giuffre.

Buckingham Palace previously “emphatically denied that the Duke of York had any form of sexual contact or relationship with Virginia Roberts,” insisting, “Any claim to the contrary is false and without foundation.”

The palace told the Standard it is not commenting on the ex-officer’s claims.