McCLELLAN, C. J.
An affidavit having been made before a justice of tbe peace charging Andrew Sistrnnk with tbe offense of robbery, tbe justice issued thereon a warrant for tbe arrest of said Sistrnnk, and commanding that be be brought before said justice on said charge. Sistrnnk was arrested on this warrant and lodged in the. county jail until such time as the charge might be investigated by'the magistrate. While thus *69confined and prior to further action in the case before the justice, the prisoner sued out a writ of habeas corpus before the judge of Montgomery city court and upon the return thereto and the hearing thereon the city judge made an order for his discharge from custody, finding as a fact in the case that the petitioner had, in legal contemplation, been tried and acquitted of the offense now charged against him. This was error.. The magistrate issuing the warrant, and before whom it commanded that the defendant should be brought had jurisdiction of the case. When the accused is brought before him for preliminary hearing the defense of former acquittal may be set up and, if proved, it will be the duty of that magistrate to discharge the prisoner; and meantime no other magistrate has jurisdiction on habeas corpus to inquire into the accusation and discharge him. So it has been expressly ruled in a recent decision of this court. — State v. Humphrey, 125 Ala. 110.
The order of the judge of the city court must be reversed, and a judgment will be here entered denying and dismissing the petition for habeas corpus. The prisoner ivill remain in custody until discharged in due course of law.
Reversed and rendered.