NEW YORK (CBSNewYork) —  A man was shot in the stomach by police and one man is in custody after attempting to rob a trio of detectives Sunday evening.

Police told 1010 WINS a 20-year-old man was shot in the arm and torso by a detective near the intersection of Bedford Avenue and Monroe Street in Brooklyn just after 6:30 p.m.

READ MORE: 2 Shot Aboard Subway Train In Harlem; Suspect At Large

Earlier on Sunday, a woman went to look at an apartment that was supposedly for rent, but was robbed by three male teenagers instead, officials said. The woman called the cops, who then set up a meeting with the suspects themselves, according to law enforcement sources.

“The initial robbery did have a Craigslist element to it,” Chief Patrick Conry, NYPD Chief of Brooklyn Detectives, said. “Very early on in the investigation, we don’t know if the males that were apprehended here are connected with the initial robbery complaint.”

READ MORE: Caught On Video: Suspect In Attempted Rape In Brooklyn

At that meeting, one of the suspects pulled what looked like a semi-automatic weapon on the three detectives, officials said. One of the detectives then shot the 20-year-old suspect, law enforcement sources said.

The weapon was later determined to be a BB gun, CBS2’s Matt Kozar reported.

The teen was taken to Kings County Hospital as is listed in stable condition. The detective who fired the shot was taken to Methodist Hospital because of ringing in his ears.

MORE NEWS: Parents Of Michigan School Shooting Suspect Arrested After Manhunt

A second suspect, age 16, is also in custody, according to officials. A third suspect is still on the loose and is described by police as between 16 and 18 years old, wearing a gray hoodie and jeans.