Prince Andrew was given a “tense” telling off by his dad, Prince Philip — who told him to “take his punishment” because he had endangered “the very fabric of the royal family,” it was claimed Thursday.

Andrew’s scandalous ties to the Jeffrey Epstein sex trafficking scandal had already seen him dumped from royal duties by his mother, Queen Elizabeth II, and later “read the riot act” by his older brother, heir to the throne Prince Charles.

Now it has emerged that he was ordered to drive 140 miles to the Queen’s country retreat, Sandringham, for an earlier showdown with his father, the 98-year-old Duke of Edinburgh, according to the Telegraph.

“It was a tense meeting and Philip told his son he had to take his punishment,” a royal insider at Sandringham told the UK paper.

“There was no screaming or shouting but Philip told him in no uncertain terms that he had to step down for the sake of the monarchy.

“Philip doesn’t like trial by the media but he is realistic enough to realize that Andrew’s actions were a danger to the very fabric of the royal family.”

Philip arranged for Charles to take over giving his brother “the riot act” because he is slowly preparing to take control of the royal family as king, another source told the Telegraph.

“The feeling is that with Prince Philip retired at 98 and the Queen now 93, Charles has to take a firm grip on the family and plan for the future,” said another source.

“The first task was to support the Queen in helping to sort out the Andrew problem.”