The investigating authority may detain any person accused of a crime provided for in this Law for a period. or successive periods, not exceeding six months, and may extend such period for six months if the investigation so requires. In the cases where the investigation requires longer periods of detention, the matter shall be referred to the specialized criminal court to decide on the extension