Undercover narcotics detectives fired five to seven shots at a 20-year-old man during a confrontation in the northeastern Florida city of Jacksonville on Wednesday night, officials told local media.

Jacksonville Sheriff's Office Director Tom Hackney said the shooting occurred after the detectives came upon an argument between Christopher Green of Jacksonville and a group of people on the other side of the street. They intervened when they saw he had a handgun.

Green appeared to put away the handgun, Hackney told media gathered at the scene. When Green pulled the weapon out again, the officers fired at him, hitting him at least three times in the abdomen, leg and arm. He was taken to the hospital in critical condition and underwent surgery late Wednesday.

He was in stable condition on Thursday. Police have charged him with carrying a concealed weapon.

The Florida Times-Union (http://bit.ly/1NWz22x ) reports there was no immediate indication of whether the man fired at the officers.

"He pulled that gun and was not willing to retreat from those two detectives," Hackney said.

"People need to keep in mind that these things occur in seconds — the decision that police officers all over the country and here in Jacksonville have to make in these use-of-deadly force cases involve seconds," Hackney said.

The names of the detectives aren't being released because they are undercover officers. The agency said both detectives are black. Green is also black.

This was the fourth shooting involving police officers in Jacksonville since March 12. The Times-Union reports Jacksonville police have shot 108 people since 2007. Suspects died in just over half of those shootings.