A NYPD officer was arrested by Suffolk County police and charged with conspiracy, drug sales and drug possession in connection with a fatal overdose of a Long Island man last September.

Joseph Recca, 28, of West Islip, was arraigned Wednesday at Suffolk County District Court, according to reports. He was released under supervision without bail but ordered to wear an electronic monitoring anklet.

Prosecutors said Recca was the middleman in a drug ring that supplied people with oxycodone and other drugs. Investigators began looking into Recca in September, after text messages to him were allegedly discovered in the cellphone of an unidentified man in his 20s in Copiague who was found dead after overdosing on fentanyl, ethanol and oxycodone, according to the Daily News.

The text messages made it "clear the victim had been obtaining pills through Recca," ABC 7 reported.

Recca is charged with multiple felonies, including Criminal Sale of a Controlled Substance in the Third Degree, as well as misdemeanors for the Unauthorized Use of a Computer and Official Misconduct, because he used NYPD databases for running license plates, including those of unmarked police surveillance vehicles of investigators tailing him, according to the criminal complaint.

Two other men, Michael Sosa, of Brentwood, and Michael Corbett, of West Islip, were also charged with conspiracy, drug sales and drug possession, according to the Suffolk County DA's office. Prosecutors said Recca bought pills from Sosa and re-sold them to Corbett.

"Further investigation, which was conducted in collaboration with the NYPD’s Internal Affairs Bureau, revealed evidence that Recca allegedly purchases pills containing illicit substances from Sosa, and that Recca then resells the pills to Corbett for distribution. The investigation involved physical and electronic surveillance as well as court-authorized eavesdropping," the Suffolk County DA's office said.

Recca, who joined the NYPD in January 2017, was suspended without pay, according to the police department’s public information office. The PIO declined to specify where Recca was assigned, but ABC 7 reported he was with the 25th Precinct in Harlem.

“I’m shocked just as much as anyone else,” Recca’s dad Jim Recca told reporters outside his home Wednesday. “He’s a great guy and hopefully this will all go away.”

Recca was arrested Tuesday as he was leaving Sosa’s home -- the DA's office said evidence seized at the three men's homes include "400 grams of oxycodone pills and tablets, approximately $75,700 in cash, and various paraphernalia consistent with drug sales, including scales and packaging materials. A search warrant executed at Sosa’s residence in Brentwood also resulted in the seizure of a loaded 9 millimeter unserialized “ghost gun.”

“It’s a sad day that I find myself sitting in the arraignment of a police officer,” Judge James Saladino said at the virtual arraignment, the Daily News reported. “I would recommend you get an attorney, you’re going to need one, and a good one at that.”

“This is an NYPD officer who, along with two co-conspirators, was allegedly involved in operating a local drug distribution network in our community, which is very disturbing,” Suffolk County District Attorney Tim Sini said in a press release. “Our message is consistent: If you are dealing drugs in Suffolk County, we are coming for you, and no one is above the law. No matter what position you hold in our community, we will hold you accountable if you violate the law.”

Recca is due back in court July 27. If convicted, Recca, Sosa and Corbett each face up to 25 years in prison.