NEW YORK (AP) - A teenage suspect who secretly recorded his interrogation on an MP3 player has landed a veteran detective in the middle of perjury charges, authorities said Thursday. Unaware of the recording, Detective Christopher Perino testified in April that the suspect "wasn't questioned" about a shooting in the Bronx, a criminal complaint said. But then the defense confronted the detective with a transcript it said proved he had spent more than an hour unsuccessfully trying to persuade Erik Crespo to confess - at times with vulgar tactics. Once the transcript was revealed in court, prosecutors asked for a recess, defense attorney Mark DeMarco said. The detective was pulled from the witness stand and advised to get a lawyer. Perino, 42, was arraigned Thursday on 12 counts of first-degree perjury and faces as many as seven years on each count, prosecutors said. He was released on $15,000 bail. His attorney did not immediately respond to a telephone message seeking comment Thursday. A New York Police Department spokesman declined to comment. The allegations "put the safety of all law-abiding citizens at risk because they undermine the integrity and foundation of the entire criminal justice system," District Attorney Robert Johnson said in a statement. Perino had arrested Crespo on New Year's Eve 2005 while investigating the shooting of a man in an elevator. While in an interrogation room at a station house, Crespo, then 17, stealthily pressed the record button on the MP3 player, a Christmas gift, DeMarco said. After Crespo was charged with attempted murder, his family surprised DeMarco by playing him the recording. "I couldn't believe my ears," said the lawyer, who decided to keep the recording under wraps until he cross-examined Perino at the trial. Prosecutors then offered Crespo, who had faced as many as 25 years if convicted, seven years if he pleaded guilty to a weapons charge. He accepted.