A Suffolk Police Department detective pleaded guilty Tuesday to a misdemeanor charge of official misconduct for leaking confidential information to Newsday.

Det. John Oliva was charged with fourth-degree grand larceny, computer trespass and official misconduct and pleaded guilty to the last count.

State Supreme Court Justice Fernando Camacho sentenced Oliva, who retired Monday, to a conditional discharge.

Suffolk District Attorney Thomas Spota said Oliva's actions had jeopardized officers closing in on two robbery suspects in January. He said Oliva gave tour reports, intelligence reports, teletypes and personal information about other officers to Newsday.

Christopher E. Marino and Jamie Greco, 23, were indicted Jan. 27 and accused of robbing a string of Subway restaurants, gas stations and other stores at gunpoint in Lake Ronkonkoma, Medford and other areas between Dec. 9 and Jan. 7.

On Jan. 7, Suffolk police released a photo of one of the suspects, detailed some of the incidents and had asked for the public's help in solving the spate of robberies.

Oliva was pulled over July 21, sources said, and questioned by district attorney's office investigators, who produced a search warrant and took his phone.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

"I am deeply troubled and saddened by the conduct of the defendant in this case, who acted without regard to the consequences of his behavior on the safety of his fellow officers and on serious, pending criminal investigations," Spota said in a statement. "In the future, members of the department should not be enticed by reporters who encourage them to commit crimes in furtherance of their own agendas."

"We stand by our reporting and strongly deny any implication that Newsday or its reporter acted inappropriately," Newsday Editor Deborah Henley said. "Our mission is to fairly and accurately inform the Long Island community."

Oliva's former supervisor, retired Det. Sgt. Robert Doyle -- himself a 38-year veteran of the major case, homicide, narcotics and other squads -- said Oliva was one of the finest detectives ever to serve in the department. Doyle said Spota was less interested in protecting officers than in intimidating other officers into not talking with reporters.

Even though it's against the rules, Doyle said, leaks sometimes serve the public.

"We still rely on the media to expose and to tell the truth," Doyle said.

Oliva's attorney, Stephen Scaring of Garden City, declined to comment on the motivation behind the investigation. He said what his client did was "not a serious crime, but it's a crime."

William Plant, president of the Suffolk Detectives Association, praised the district attorney's office. "I'm extremely troubled that a detective was involved in something like this," he said.