Federal authorities and the NYPD Tuesday arrested a New York State Court officer accused of being in a crew that impersonated cops during robberies of suspected drug dealers on Long Island and Queens, officials said.

Nicholas Giovatto, 37, of Manhattan, assigned to Bronx County Supreme Court, faces charges of conspiracy to commit robbery and using a firearm in a crime of violence, according to Eastern District federal prosecutors Grace Cucchissi and Lara Treinis Gatz.

Conviction of the use of a firearm in the commission of a violent crime, such as robbery, can carry a sentence of up to life in prison.

In one home invasion robbery, Giovatto and his crew made off with $30,000, prosecutors said. Giovatto also used his service weapon in at least one of the holdups, prosecutors said.

At Giovatto’s arraignment in a Central Islip federal courtroom, U.S. Magistrate Steven Locke ordered him held until he could work out conditions of his bail bond with prosecutors.

Giovatto was not required to enter a plea to the charges.

Prosecutors and Giovatto’s attorney, Kyle Watters, of Manhattan, all declined to comment afterward.

State officials suspended Giovatto without pay following his arrest, said Arlene Hackel, a spokeswoman for the state Office of Court Administration in Albany.

The arrest of Giovatto, a nine-year veteran, followed an investigation by an NYPD unit specializing in crimes committed by people impersonating police officers and agents of the federal Bureau of Alcohol, Tobacco, Firearms and Explosives, officials said. Prosecutors said the investigation into Giovatto’s crew is continuing.

advertisement | advertise on newsday

“Law enforcement officers who violate their oath to protect the public, whether inside or outside the courthouse, will be held accountable for their actions,” said Robert L. Capers, U.S. attorney for the Eastern District of New York. “No one is above the law.”

Giovatto “apparently believes that a life of crime would be more beneficial than one of protecting and serving,” said Delano Reid, head of the New York office of the ATFE. “I suspect now . . . he will quickly realize that he made the wrong choice.”

Prosecutors singled out two crimes they said Giovatto carried out with other members of the crew.

In one, on Dec. 20, 2011, Giovatto and another member of his crew allegedly entered a home on 17th Avenue in Queens, falsely identifying themselves as police officers, and claiming they had a search warrant.

After they gained entrance, Giovatto brandished a firearm, while his co-conspirator handcuffed the robbery victim and ransacked the home, the prosecutors said in court papers. The two fled with more than $30,000 in cash and several items of jewelry.

In another instance, on March 10, 2012, Giovatto and a member of the crew unsuccessfully attempted to enter a residence on 36th Avenue in Queens to commit a similar robbery, the papers said. But the residents refused to let them in, the papers said.