This matter is before us upon a demurrer to and a motion to quash a petition for a writ of certiorari. The petitioner alleges the arrest and binding over to the circuit court of Brookings county by a justice of the peace of that county of one Norman Emily; that bail was fixed at $750; that this petitioner deposited said sum as cash bail and that said Emily was released .from custody; that upon the trial said Emily did appear and was convicted; that the judgment of the circuit court was that Emily should pay a fine of $500 and costs and be committed to the county jail for the period of five months. Said judgment also' contained the following direction:
“It is further ordered that the aforesaid fine and costs be paid out of the cash deposit furnished by the said defendant in lieu of bail for his appearance at the regular May, 1926, term of this court, and that the balance, if any, of said cash deposit in lieu of bail be returned to said defendant.”
This portion of the judgment is the crux of the petition for certiorari. It is petitioner’s contention that his money, deposited to secure Emily’s appearance at the trial, cannot be thus summarily applied to the payment of the judgment against Emily, nor at all.
It is urged by the Attorney General that certiorari is not the proper remedy for a review of this matter; that certiorari brings up for review only the record and the questions determined on the record in the trial court; that certiorari reviews merely questions of law, not questions of fact, viz., not the question as to who made the deposit; that petitioner is not a party beneficially interested (Rev. Code 1919, § 2997); that cash bail is considered as having been deposited by the accused; and therefore that the direction above questioned was rightly made.
It is true that as a general rule certiorari does not issue at the behest of one not a party to the proceeding, but in exceptional cases it will issue -upon the petition of one interest'’! in the subject matter upon which the record acts. Dexter v. Council, 17 R. I. 222, 21 A. 347; Hemmer v. Bonson, 139 Iowa 210, 117 N. W. 257, 19 R. R. A. (N. S.) 610; Clary v. Hoagland, 5 Cal. 476. We are of the opinion that the facts alleged in the petition show such a direct interest in petitioner in the judg*278ment of the trial co-urt as to entitle him to- apply for a writ of certiorari.
Section 4600, Rev. Code 1919, provides:
“A deposit of the sum of money mentioned in the order admitting to bail is equivalent-to bail, and. upon such deposit the defendant must be -discharged from- custody.”
It must be remembered that this bail was given pursuant to a preliminary examination under the provisions of section 4581, Rev. Code 1919. The purpose of the bail was solely to secure the presence of the accused at the trial in circuit court, and it was in no sense a supersedeas undertaking as upon appeal from a judgment of conviction. The docket of the justice of the peace before whom the preliminary examination was held contains the following recitals:
“It appearing to this court that the crime of unlawfully selling, furnishing and giving way intoxicating liquor has been committed, and that there is just cause to believe that the defendant, Norman Emily, is guilty thereof, I therefore order that he be held to answer this charge at the next regular term of the circuit court of Brookings, to be held at Brookings, S. D., and is admitted to bail in the sum of seven hundred and fifty dollars to so appear. Cash bail is furnshed and approved.”
The last quoted sentence, “Cash bail is furnished and approved,” is not a contradiction of the allegation in the petition' for certiorari that petitioner made the deposit, and for the purposes of the present hearing we must assume that petitioner did make the deposit, and therefore that petitioner is beneficially interested and is entitled to question the jurisdiction oí the trial court to dispose of his money in the manner done.
We have examined the authorities cited by the Attorney General in support of his position that the cash deposit is available for the payment of the fine, especially those contained in note in 7 A. L. R. 389, 392, but we cannot agree that the rule there so broadly announced is applicable to the situation before us. Tire rule there announced is:
“In jurisdictions where, by statute, a deposit of money may be made in lieu of bail in criminal cases, the decisions are unani*279mous in holding that a fine imposed on the accused may be satisfied from the cash deposit; and this is true, although the money has been furnished by a third person.”
To the contrary see Isbill v. Bay Circuit Judge, 215 Mich. 364, 183 N. W. 721, 16 A. L. R. 971.
We have no statute permitting a cash deposit given in lieu of bail for appearance to- be applied by the court in payment of a judgment. In our arrest and bail statutes under the Code of Civil Procedure, §§ 2383-2410, there is a specific provision in section 2405 for the subjection of a -cash deposit to the payment of the judgment, but that section has no application to cash bail given upon preliminary examination in a criminal proceeding. Our statute (section 4600 above q-uo-ted) does not necessarily contemplate that cash bail is the money of the accused. Finally, the statute says that the cash deposit is the equivalent of bail. If that is so, then the right of the owner of the cash deposit is the same as would be his right if he were- surety on a formal bail bond. In such a case it would not be claimed- that the bond for appearance would be held to- cover a liability under the judgment.
We are of the opinion that upon the showing made the trial court exceeded its jurisdiction in making and entering that portion of the judgment hereinbefore recited.
The demurrer to the petition will be overruled, and the motion to quash will be denied.
DILLON, J., not sitting.