Four people were wounded in a drive-by shooting Tuesday night in Brooklyn, authorities said.

The victims — 15-, 21-, 31- and 46-year-old males — were standing outside a building at 181 Martense St., at 8:08 p.m., when shots rang out from a passing car in East Flatbush, law enforcement sources said.

One of the victims was a local barber, according to the owner of nearby Brooklyn’z Blade Unisex. The victim works at another barber shop and had dropped by to say hello at Brooklyn’z Blade Unisex moments before the shooting.

“After the shots stopped I saw the barber holding his stomach, he was yelling, `Call the police!’ ” the shop owner said. “I just know he got shot in his hand and looked like the same shot hit his hand and his stomach — his whole shirt had blood all over it.”

Three minutes later and 1 ½ miles to the north, a 27-year-old man was shot near the corner Bedford Avenue and Union Street, police said.

A suspect was picked up for that second shooting, law enforcement sources said. While that suspected gunman wasn’t a motorist, sources said, investigators want to know if there’s any connection between the two attacks that happened so relatively close together.

All five of the shooting victims are expected to survive, police said.

Additional reporting by David K. Li