TROY — A 26-year veteran police sergeant was arrested Friday morning by the New York Police Department on charges accusing him of committing computer crimes dangerous to minors, city police said.

Sgt. Patrick Rosney, 53, was arrested Friday morning when he arrived for work at police headquarters. He was handcuffed while in uniform.

It was a sting operation involving a New York City police officer posing as a 14-year-old girl, according to several people briefed on the arrest.

Rosney was allowed to change into civilian clothes before he was driven to Queens to be arraigned for first-degree attempted dissemination of indecent material to minors, a felony and attempted endangering the welfare of a child, a misdemeanor.

Rosney was suspended without pay for 30 days when he was arrested. His base pay is $68,040, according to city payroll records. In 2011, he earned $89,167 including overtime, according to the records.

Chief John Tedesco said the department's Internal Affairs Unit will investigate the allegations against Rosney to determine if local criminal charges should be filed and what departmental charges he could face. His service weapon and credentials were taken from him.

Rosney's fellow officers were shocked and angered by his alleged actions, Tedesco said.

"We are a strong department. We are a department of character. We expect a rough road," Tedesco said.

"To see a police officer in handcuffs is very disturbing and hurtful," said Officer Robert Fitzgerald, president of the Troy Police Benevolent Association.

Mayor Lou Rosamilia said the city would cooperate with the NYPD investigation.

"The allegations in this case are deplorable," the mayor said. "This is a deeply disturbing incident, and certainly not reflective of the overall character and quality of our police department."

Rosney was in charge of the department's records. He has served in the patrol division, the drug unit and as a detective. He has no record of disciplinary problems, Tedesco said.

The department's Internal Affairs Unit was notified of the investigation by the NYPD on Wednesday night. Troy officers and the New York City detectives went to Rosney's Rensselaer home Friday to conduct a search and seize his computer.

Rosney is married and has two children, according to officials.

There is no indication that he used Troy police computers or other equipment in the alleged interaction. Tedesco said that Rosney had not met the officer posing as the 14-year-old girl but conducted online conversations in a chat room. Tedesco said Rosney had identified himself as a police officer.

kcrowe@timesunion.com • 518-454-5084 • @KennethCrowe