After a 14-hour session, the judge ruled that "detention as a preventive measure cannot be maintained