A man was shot by police in Brooklyn Wednesday during what authorities say was a search for a gun.

Police say a search warrant led them to a building on Pine Street in East New York just after 7:30 a.m. When they went down to the basement, they found a 32-year-old man.

Police say the man did not follow directions from officers and moved further inside the basement after police came in. That's when an officer shot him once in the leg.

The man was taken to the hospital in stable condition.