A state judge issued the ruling Wednesday after finding that 20-year-old Alexander DeJesus could pose a threat to public safety. His lawyer had argued DeJesus posed a "low risk" for committing a violent crime or not showing up for court dates.
DeJesus is among three men charged in the shooting. They all face charges of attempted murder, aggravated assault and weapon offenses.
The plainclothes detectives were wounded as they sat in their unmarked SUV at a red light on Aug. 7.
The male detective suffered wounds to his bicep and forearm. The female detective was struck in her hand. Both remain out on administrative leave as they continue to recover.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.