A former NYPD detective from Copiague was sentenced Thursday to 6 years in federal prison for his role in a burglary ring that operated on Long Island and claimed more than $8 million in money and goods from homes and businesses, prosecutors said.

Rafael Astacio, 43, had pleaded guilty in 2014 to conspiracy to commit interstate transportation of stolen property and filing a fraudulent tax return, prosecutors said.

In addition to the prison sentence, U.S. District Judge Joseph Bianco in Central Islip imposed three years of supervised release on Astacio, as well as $200,000 in forfeited funds and restitution at $1.8 million.

DataLI crime stats

Between 2010 and 2012, Astacio was part of a crew behind three dozen commercial and 10 home burglaries. The group used blowtorches, crowbars, wire cutters, sledgehammers, cellphone jammers, police scanners and an automobile tracking device to steal an estimated $8 million in money and property.

Astacio participated in six commercial and five residential burglaries, prosecutors said, and helped steal cash and property valued at more than $5.3 million. Prosecutors added that Astacio used his role in the NYPD to locate the addresses of potential targets.

As part of a plea bargain, Astacio admitted in 2014 to serving as a lookout for the burglaries, which took place largely on Long Island. Officials previously said the burglaries included $3 million in sunglasses from a Plainview wholesale distributor and $2 million in cash from a Woodbury plastic surgeon’s office.

advertisement | advertise on newsday

“For years, Astacio and his crew invaded Long Island homes and businesses and stole money and property. By victimizing the very same people he took an oath to serve and protect, the defendant compounded his criminal acts,” Eastern District U.S. Attorney Robert Capers said in a statement.

Astacio’s Manhattan-based attorney, Peter Brill, said in a statement: “Rafael Astacio honorably served the people of New York City for nearly 20 years, but he has also taken full responsibility for the crimes he committed between 2010 and 2012, and he will be punished for those crimes.

“He has already lost his job and his pension, and he will lose his freedom as well. He hopes one day to be able to rebuild his life and to make his children proud once again,” Brill said.

Astacio also awaits sentencing on a felony burglary charge in Suffolk County. He is due in court in Central Islip on Feb. 10.

“While most police officers serve with integrity and honor, former Detective Astacio broke his oath and the law when he conspired with others to steal millions of dollars’ worth of property and cash from homes and businesses in our area,” Nassau District Attorney Madeline Singas said in a statement.

Several agencies worked on the case, including Nassau County police, the Nassau district attorney’s office, the FBI, the NYPD and the Internal Revenue Service.