The eldest son of ex-Alaska Gov. Sarah Palin beat the daylights out of his own father after he broke into his parents’ home in a drunken rage, according to documents released by local police.

Track Palin, 28, was busted Saturday and charged with first-degree burglary, fourth-degree assault and criminal mischief, and remains in custody.

A court document said the younger Palin wanted to visit the home to retrieve a truck.

But his father, Todd Palin, told him to stay away because Track Palin was drunk and on pain medication, according to a police affidavit and charging documents obtained by the Los Angeles Times.

“Track told him he was [going to] come anyway to beat his ass,” according to an affidavit filed by Wasilla Police Officer Adam LaPointe.

Todd Palin answered the door armed with a pistol when his son arrived, but Track broke a window to get into the house and then started savagely beating Todd, cops said.

The younger Palin threw his dad to the floor and hit him repeatedly in the head, leaving him covered in blood and with a liquid oozing from his ear, the documents said.

Sarah Palin, the 2008 Republican vice presidential nominee, called police at 8:30 p.m. and said her son was “freaking out and was on some type of medication.”

When cops arrived, they saw the parents fleeing the house in separate vehicles, Todd Palin with blood running down his face and Sarah Palin looking “visibly upset,” the paper reported.

Police confronted Track Palin, who called them “peasants” and told them to lay down their weapons, according to the documents. Eventually, Palin left the house and was handcuffed.

He told cops he had told his father to shoot him several times, according to the documents.

A judge set Track Palin’s bail at $5,000, and he remained jailed at the Mat-Su Pretrial Facility in Palmer, Alaska.

During the 2008 presidential campaign, when Sarah Palin was Sen. John McCain’s running mate, she often boasted of her son’s service in the military in Iraq.