The troubled young son of famed Met shortstop Bud Harrelson gave erratic but damning testimony yesterday in the murder trial of a Long Island teen charged with killing his stepfather with a samurai sword last year.

T.J. Harrelson, 19, told the court that he helped his close friend Zachary Gibian, also 19, dump evidence from the killing.

He said Gibian called him after committing the grisly crime in February of 2005, eventually admitted to the slaying and then desperately asked for his help in dumping a garbage bag that contained the sword and other incriminating evidence.

Prosecutors charge that Gibian nearly decapitated his stepfather, retired NYPD cop Scott Nager, 51, with two hacks of a two-foot long blade as he took a late morning nap in his Hauppauge home. The DA argues that petty disputes, including a disagreement of the use of a new car, led to the slaying.

With his glum father seated in the first row, the prosecution’s star witness spoke in a monotone looked uncomfortable during his testimony.

He told the court that Gibian called him after allegedly committing the murder and asked for help.

“He told me to be a good friend and come pick him up,” Harrelson said, telling the court that he had no foreknowledge of the murder.

Harrelson, who admitted to heavy drug use, depression and delinquency since middle school, then offered his most damaging recollection of the meeting.

“He was breathing hard,” he said. “He looked upset. When he got in the car he told me he killed his father.”

Harrelson said that the pair drove in his mother’s car to Lake Ronkonkoma to dump a large black garbage bag that contained several incriminating items but that it had frozen over. They finally discarded it near a set of strip mall Dumpsters.

Gibian’s attorney, William Keahon, reminded jurors that the younger Harrelson agreed to a plea deal in connection to the case in exchange for his testimony and repeatedly punched holes in Harrelson’s recollection of events.

Keahon, who has suggested that Gibian’s mother, Laura Nager, committed the crime, pointed to several discrepancies in Harrelson’s testimony, including his recollection of one phone call from Gibian after the murder when phone records showed five.

Bud Harrelson, who came to court in a dark gray suit, slicked back gray hair and glasses, watched as his son recalled his heavy cocaine and marijuana use during his high school years.

The former shortstop, a member of the 1969 Miracle Mets Championship squad, comforted his emotionally spent son after the long day of testimony ended, massaging his shoulder and patting him gently on the back.