A quick-thinking city emergency medical technician disarmed an emotionally disturbed man Monday who -- despite being handcuffed -- managed to grab an NYPD officer's gun and fire two shots, wounding another officer, officials said.

The wounded officer was taken to Harlem Hospital Center after his left foot was grazed by a bullet, police Commissioner Ray Kelly said.

The officer, Fausto Gomez, 40, was treated and released, officials said.

The confrontation occurred Monday morning as police were taking Guiteau Idore, 41, of Queens Village to Harlem Hospital for a psychiatric evaluation. He had been throwing bottles and assaulted someone at 117th Street and Lexington Avenue, police said.

Officer John Chiodo, 42, and Gomez, of the 25th Precinct, responded to the call and eventually handcuffed Idore and escorted him into an ambulance.

After the ambulance arrived at the hospital and he was being taken inside, Idore struggled with the officers, but was subdued. He still managed to pull Chiodo's pistol from his holster and, despite being handcuffed behind his back, fired the shots, investigators said. One round nicked the left foot of Gomez, a seven-year veteran.

EMT Brendon Hernandez was nearby and quickly pulled the gun from Idore's hand and opened the action to make it safe so that it couldn't fire again, Kelly said at a hospital news conference attended by Mayor Michael Bloomberg.

advertisement | advertise on newsday

Hernandez said he "just wanted to get the gun out of the air, just don't make nothing worse."

Hernandez, who aspires to become a police officer, admitted that he was frightened.

"I was scared, scared for my safety, my partner's safety, especially the cops and people walking by," Hernandez said.

Kelly said Hernandez's actions show he has the ability to be a police officer.

"He certainly demonstrated that he has what it takes to do the job," Kelly said.

Bloomberg said, "Fortunately in this case, it was not a serious wound, but a tiny fraction of a degree difference in the direction of the gun and it could have been."

Idore, who police said had an extensive arrest history for assault, menacing and domestic violence, was taken to Metropolitan Hospital Center for psychiatric evaluation, he added. He was charged last night with attempted murder, robbery and assault, officials said.

A police official said the removal of the weapon from an officer's holster by someone in custody was unusual. Police don't have locks on their weapons because the department believes it would create problems during tactical situations where officers need to have immediate access to their guns, said the official.

With John Valenti and Maria Alvarez