W. H. Baugh, the petitioner herein, and A. M. Brickey, Jake Rolfson, Sam Adams and A. W. Gregor were arrested upon a charge of having intoxicating liquor in their possession, contrary to law, in Lincoln county. A preliminary examination was had before the probate judge of that county, sitting as a committing magistrate, which resulted in petitioner being held to answer -to said charge in the district court. He gave bond for Ms appearance, was after*389ward surrendered to the sheriff by his bondsmen, and petitioned this court for and procured the issuance of a writ of habeas corpus, directed to that officer, commanding him to bring petitioner before the court that the cause of his detention might be inquired into. The sheriff’s return to the writ shows that he holds petitioner in custody pursuant to the proceedings above described and by reason of his surrender by the sureties on his bond. The question presented here is: Does the evidence taken at the preliminary examination justify the action of the magistrate in holding petitioner to answer?
See. 7578, Rev. Codes, relating to preliminary examinations, provides: “If, after hearing the proofs, it appears either that no public offense has been committed or that there is not sufficient cause to believe the defendant guilty of a public offense, the magistrate must order the defendant to be discharged.....”
It is well established that, upon petition for a writ of habeas corpus, the court can go back of the order of commitment by a magistrate and inquire into the question of probable cause. See. 8354, Rev. Codes, referring to the writ of habeas corpus, provides: “If it appears on a return of the writ that the prisoner is in custody by virtue of process from any court of this state, or judge or officer thereof, such prisoner may be discharged in any of the following cases, subject to the restrictions of the last section: .... 7. Where a party has been committed on a criminal charge without reasonable or probable cause.” (See, also, In re Heigho, 18 Ida. 566, Ann. Cas. 1912A, 138, 110 Pac. 1029, 32 L. R. A., N. S., 877; In re Knudtson, 10 Ida. 676, 79 Pac. 641; Ex parte Sternes, 82 Cal. 245, 23 Pac. 38; In re Snell, 31 Minn. 110, 16 N. W. 692; Ex parte Beville, 6 Okl. Cr. 145, 117 Pac. 725; People v. Moss, 187 N. Y. 410, 10 Ann. Cas. 309, 80 N. E. 383, 11 L. R. A., N. S., 528.)
In habeas corpus proceedings the sufficiency of the evidence to justify a verdict or the submission of the case to the jury will not be inquired into. The writ cannot be so used as to exercise the functions of an appeal, but the court may inquire into and examine the proofs submitted at a preliminary hear*390ing to see whether or not', first, there is any evidence tending to show that a public offense has been committed; second, there was cause to believe the accused committed it. (State v. Beaverstad, 12 N. D. 527, 97 N. W. 548; State v. Huegin, 110 Wis. 189, 85 N. W. 1046, 62 L. R. A. 700.)
The testimony taken at the preliminary examination was reduced to writing and is here for our consideration. It appears therefrom that petitioner is a physician and surgeon, residing at Shoshone in Lincoln county; that he owns a drugstore and the building in which it is situated, and that the second story of the store building is conducted as a lodging-house.
The evidence introduced on behalf of the state consists, in addition to certain exhibits, of the testimony of the sheriff who testified that on February 18, 1917, at about 11:30 P. M., he saw Brickey and Rolfson cross the railroad tracks coming from train No. 17, which is one of the main line west-bound passenger trains of the Oregon Short Line Railroad Company, and they had in their possession a satchel; that they went directly to and into petitioner’s drug-store. The sheriff entered the store immediately after Brickey and Rolfson and found therein, in addition to the two men last named, Gregor and Adams, the latter being employed as a clerk in the store. The officer asked where the satchel was, to which Rolfson replied that he didn’t know anything about a satchel. The sheriff then stated that he had seen them bring it into the store and that he was going to get it. He asked Brickey where it was and he replied that he didn’t know anything about it. Adams, however, pointed out the satchel to him and he took it into his possession. He afterward broke open the satchel and found twelve quarts of whisky in it. It further appears from the sheriff’s testimony that he did not see the petitioner during that evening, although he was both upstairs and downstairs in the store building.
From the testimony of petitioner, which was taken at the preliminary examination and which is uncontradicted, it appears that on the evening of the occurrences above mentioned he received instructions from the Oregon Short Line Railroad *391Company, of which company he was assistant surgeon, to visit certain patients out of town, and that he left Shoshone for that purpose on a freight train about a quarter past 11 o’clock that evening, and did not return until about 5 o ’clock next morning ; that he left Adams in the store at the desk writing a letter and that he had no knowledge whatever of the acts of Rolfson, Gregor or Brickey that evening. Petitioner further testified that he had no knowledge about the valise or its contents or as to where they came from except from hearsay. It appears from the testimony of Adams, and it is uncontradicted, that when Brickey and Rolfson came to the drug-store the former applied for a room and that he directed him upstairs where he later procured lodgings.
The proceedings before the committing magistrate was commenced pursuant to chap. 11, Sess. Laws 1915, p. 41, see. 2 of which provides: ‘ ‘ It shall be unlawful for any person .... to have in his .... possession .... any intoxicating liquor. . ” That law has been fully discussed and construed by this court in In re Application of Crane for a Writ of Habeas Corpus, 27 Ida. 671, 151 Pac. 1006.
The evidence introduced at the preliminary examination clearly shows that the crime of having intoxicating liquor in his possession has been committed by someone, but absolutely fails to connect the petitioner with the offense, except that he owned the building into which it was carried without his knowledge or consent. If this may be deemed to be even constructive possession, which is doubtful under the circumstances disclosed by the record before us, it clearly is not such a possession as is contemplated by the law of 1915, supra. That law clearly contemplates that the possession of intoxicating liquor, in order to be a crime, must be had knowingly or at least by the connivance or with the consent of the possessor. It is not to be understood that it may be violated accidently, inadvertently or innocently, but if violated at all, it must be done, as charged in the criminal complaint in this ease, knowingly, intentionally and unlawfully. Sec. 6314, Rev. Codes, provides: “In every crime or public offense there must exist a union, or joint operation, of act and intent, or *392criminal negligence.” (State v. Omaechevviaria, 27 Ida. 797, 152 Pac. 280.)
The prayer of the petition is granted and the sheriff of Lincoln county is directed to discharge the petitioner from custody.
Budge, C. J., and Bice, J., concur.