The gunman wanted for shooting three innocent bystanders near a Brooklyn hospital was aiming for a group of teens gathered for a fight with his girlfriend’s daughter, police said Thursday.

Allan Joseph, 52, was busted Wednesday night when officers ran the license plate on his Chevy Equinox because it was is a no-standing zone near Classon Ave. and Eastern Parkway in Crown Heights, police said.

The vehicle, it turns out, had been flagged in a database, meaning someone in the compact SUV had used it during the commission of a crime.

Joseph, who was in the driver’s seat, was busted for gun possession — of the same revolver police believe he fired last Friday afternoon, wounding three innocents near Marcus Garvey Blvd. and Broadway, near Woodhull Hospital.

Those victims — a 33-year-old

See Full Page