A New York scientist has pleaded guilty to charges in connection with running a "Breaking Bad"-style meth lab that police first discovered when he reported a break-in last year.

Matthew Leshinsky, 23, of Farmingville, inadvertently turned himself in when he called police on June 7 at about 3:30 a.m. to report a burglary at his business, Quantitative Laboratories, LLC, which is located in Ronkonkoma, according to the Suffolk County District Attorney's Office.

Suffolk County Police responded to the scene and found broken glass at the entrance of the lab. Officers also discovered what appeared to be a clandestine laboratory that was involved in the manufacture, production, and preparation of methamphetamine and dimethyltryptamine, a hallucinogenic substance, as well as other controlled substances.

A search warrant for the property was then obtained and police found more than 100 items of laboratory equipment, chemical reagents and solvents used in the manufacture, production or preparation of methamphetamine, as well as substances that resulted from the production or preparation of methamphetamine.

TEXAS SUSPECT CHARGED WITH MURDER AFTER ALLEGEDLY USING UBER TO DELIVER FATAL FENTANYL PILLS: POLICE

Matthew Leshinsky

Matthew Leshinsky, 23, inadvertently turned himself in when he called police on June 7 at about 3:30 a.m. to report a burglary at his business. (Suffolk County District Attorney’s Office)

Police also located ecstasy, more than three ounces of methamphetamine, more than 625,000 milligrams of pure ketamine and more than 20 plastic 55-gallon drums of Gamma-butyrolactone, which is chemically similar to Gamma hydroxybutyric acid, otherwise referred to as the "date rape drug."

About $40,000 was also seized from the property as police executed the search warrant.

"This defendant was operating a Breaking Bad-style drug lab and tried to conceal it under the guise of a legitimate business," Suffolk County District Attorney Raymond Tierney said in a press release, referring to the fictional television series "Breaking Bad" in which a high school chemistry teacher starts a meth lab. "He then inadvertently turned himself in when he reported that a burglary occurred at that same business."

Leshinsky pleaded guilty on Thursday to 13 charges, including Unlawful Manufacture of Methamphetamine, Unlawful Disposal of Methamphetamine Laboratory Material, Criminal Possession of Methamphetamine Manufacturing Material and Reckless Endangerment.

CALIFORNIA K-9 FINDS POUNDS OF METH HIDDEN IN DOG TREAT BOXES DURING TRAFFIC STOP: POLICE

Suffolk County District Attorney Ray Tierney speaks

Suffolk County District Attorney Ray Tierney said Matthew Leshinsky was "operating a Breaking Bad-style drug lab." (James Carbone-Pool/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

He is due back in court for sentencing on March 20.

Despite admitting to manufacturing the drugs, Leshinsky's attorney David Besso told Newsday that his client is a "brilliant" scientist who was analyzing drug addiction "for the public good" and denied accusations that he sold meth out of the lab.

Besso said Leshinsky applied for a license through the Department of Environmental Conservation but was working without the correct certification at the time of his arrest.

"Unfortunately, he went about it the wrong way," Besso said.