Disgraced former Suffolk County Police Chief James Burke — who was denied bail on a misconduct case Friday — stymied the FBI’s investigation into the Gilgo Beach serial-killings for years, The Post has learned.

Burke — who was busted Wednesday for allegedly assaulting a Smithtown man in 2012 — refused to keep the feds in the loop on the unsolved murders of eight women, a man and a toddler on or near the beach, a source said.

That’s because he learned he was in the FBI’s cross hairs for assaulting Christopher Loeb, who allegedly stole his sex toys, sources said.

“Burke never wanted us involved in this [serial killer] case because he knew we were ­investigating him,” said a federal source.

The ex-chief, who resigned in October, was busted Wednesday on a federal indictment charging he viciously attacked a handcuffed suspect who swiped items from his vehicle — including pornography and sex toys — and then tried to cover up the assault.

A day after Burke’s indictment, Suffolk Police Commissioner Tim Sini announced that the FBI would now play a major role in the Gilgo Beach cold case.

“We’re going to take a good, hard look at this case with fresh eyes,” the federal source said. “We have the extensive resources and experienced investigators to solve this type of case.”

Burke kept the FBI at bay while he was chief from January 2012 to October 2015, sources said.

Some of the murdered women are believed to have worked in the sex industry.

No suspects have been identified.

Sini said the addition of the FBI to the so-called “Long Island serial killer” investigation is part of an overall review of all current investigations.’’

Friday was the fifth anniversary of the discovery of the first victim, Melissa Barthelemy.

At his bail hearing Friday, federal judge Leonard Wexler called the misconduct allegations against Burke “shocking.” The judge refused to set bail.

Prosecutors had pushed to keep Burke behind bars — describing his alleged intimidation tactics as Suffolk County’s top cop as similar to the Soviet-era KGB.

They say Burke tried to silence potential witnesses and posed a threat to the community.