delivered Tins opinion oe the court.
John Thompson was arrested on the charge of larceny and brought before the county judge of Nicholas county for trial. After hearing the evidence, the court adjudged it insufficient and discharged him from' custody. Immediately following that part of the order discharging John Thompson, the court, in the same order, used language as *594follows: “On motion of attorney fro tem. for the county, the court, from its personal knowledge, advised by testimony given in this court, holds Mack Thompson to answer the charge of larceny, and fixes his bail at $100. The defendant appeared and executed bond for his appearance, which is approved by the court.”
, Mack Thompson was no party to the proceedings against John Thompson; had never been arrested, and was not in custody, as appears from the order, when it was made.
The Criminal Code, in regulating proceedings before a magistrate, as an examining court, contemplates a trial. It is the duty of the magistrate, before commencing the examination, “to state the charge and inquire of the defendant whether he desires the aid of counsel, and shall allow reasonable opportunity for procuring it.” Section 51 Criminal Code.
If the magistrate finds from the examination that there are reasonable grounds to believe the defendant guilty of .the offense charged, he shall be held for trial. If, upon the trial, it shall appear that the defendant is guilty of a public offense other than that charged in the warrant, he shall be held in custody of the officer, and tried for such an offense, a reasonable opportunity having been given him to obtain his witnesses and prepare his defense. Section 86-, Criminal Code.
There must be a party in custody, charged with an offense, in order to give a magistrate jurisdiction to “examine the charge and commit to jail or hold to bail the person charged with its commission.”
When a person is undergoing an investigation on one charge, and upon the trial it appears he is guilty of a public offense other than that charged in the warrant, he shall *595remain in custody of tbe officer, but he can not be held to bail or committed to jail thereon without a trial.
In the case at bar the party was not in custody; not charged with an offense; had no trial; but, as appears from the order, was adjudged to answer the charge of larceny. Until this was done it seems, from the order, that the “defendant” did not appear.
Section 85, Criminal Code, declares that bail bonds and recognizances shall not be invalid for certain reasons named, “nor by any other irregularity, provided it be made to appear that the defendant was legally in custody, charged with a public offense, and that he was discharged by reason of the giving of the bond or recognizance, and provided it can be ascertained from the bond or recognizance that the bail undertook that the defendant appear before a magistrate for the examination of the charge, or before a court for the trial thereof.”
This section, in effect, provides that a bail bond is not valid unless the defendant was “legally in custody, charged with a public offense,” when executed.
Mack Thompson was not arrested for a public offense, nor was he charged with having committed one, nor was he tried at all, neither did he waive an examination. Under such circumstances the mere fact that the court said he held him over on testimony given in a proceeding, to which he was no party, did not place him “legally in custody, charged with a public offense.” Hence the bond is invalid, and the sureties are not liable.
The judgment is affirmed.