Hakim bin Mu'awiyah narrates from his father (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) detained a man on a suspicion for part of a day, then released him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب التفليس / 11291
Abu Ja'far (may Allah have mercy on him) said that Sayyiduna Ali (may Allah be pleased with him) said: Detention is only until the matter becomes clear to the ruler (imam); once the matter has become clear, keeping him detained after that is injustice.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب التفليس / 11292