Cops shot and wounded a man in Brooklyn early Wednesday after police said he ignored an officer's warning.

Authorities said the 32-year-old man, who was not identified as of late Wednesday afternoon, was inside 430 Pine St. in East New York when investigators came to the house at around 7:40 a.m.

RELATED: Divers recover gun NYPD believe tied shooting death of Officer Holder

The officers were at the scene to execute a search warrant for a gun, police said, when some of the cops began to walk down to the building's basement.

There, the man being questioned over the possible gun possession refused to follow the officers' orders, allegedly going deeper into the basement and evading the police.

RELATED: NYPD: Three suspects apprehended after allegedly shooting at police

That's when NYPD said one of the detectives at the scene fired one round from his gun, hitting the suspect in his lower right leg.

Police were unable to say what precipitated the shooting.

Paramedics at the scene tended to the man and rushed him to Brookdale University Hospital and Medical Center, where officials said he was in stable condition.

The detective who fired his handgun was taken to Jamaica Hospital for observation.