delivered the opinion of the court.
This is an action upon a ne exeat bond, and is brought against both the principal and the surety. To the second amended complaint the defendant surety filed a demurrer upon the ground that the complaint “does not state facts sufficient to constitute a cause of action against this defendant.” The demurrer was sustained, and plaintiff electing to stand on the complaint,- judgment was entered for the defendant surety. The plaintiff brings error, and the cause is before us upon an application for a supersedeas.
Error is assigned to the sustaining of the demurrer, and, according to the briefs, the main question to be determined is whether, under the allegations of the second amended complaint, the ne exeat bond is valid as against the surety.
The complaint in question alleges, among other things, that in an action for divorce and alimony the plaintiff therein filed a petition for a writ of ne exeat against the defendant therein; that a hearing was had upon such petition, and that at the hearing both parties, their respective counsel, and one David Goldstein were present; and, that upon the hearing the court:
“promulgated and entered an order that a writ of ne exeat issue against the defendant, Louis Sochet, and that he the said Louis Sochet, be taken into custody by the sheriff * * * then and there, and that he be held by the sheriff *25until he gives a ne exeat bond in the sum of $1000.00.”
Further allegations are as follows:
“That in pursuance of and in compliance with said order * * * the sheriff * * * took the said Louis Sochet into custody and held him as the said order * * * required him to do.
“That immediately after the sheriff took the said Louis Sochet into custody, * * * the defendant herein, David Goldstein, who was present at said hearing * * * wherein the said * * * court entered the order for the issuance of the writ of ne exeat, and with full knowledge of all of the proceedings and of what took place prior thereto, told and offered to the said sheriff * * * to go on as surety and furnish the said bond for said $1,000.00, as required by said order * * * and then and there asked said sheriff that he be permitted to qualify as surety on said bond in order that defendant Louis Sochet might be released from custody.
“That in compliance with said request of said defendant David Goldstein the sheriff permitted the said David Gold-stein then and there * * * to make, sign, execute and deliver to the said sheriff * ' * * a certain instrument of writing, or ne exeat bond in the sum of $1,000.00.
“That relying upon said bond given by said David Gold-stein, the sheriff released the said Louis Sochet from custody as by said David Goldstein desired and requested.”
The complaint does not show that any writ of ne exeat was ever issued. Relying upon this fact, counsel for the defendant surety contend that Louis Sochet was illegally arrested and executed the bond under duress of imprisonment. This contention, however, even if sound, establishes no defense to the surety. According to the allegations of the complaint, the surety had full knowledge of the circumstances attending the arrest and detention of the defendant Sochet. In Haney v. People, 12 Colo. 345, 350, 21 Pac. 39, 41, in an action upon a forfeited recognizance, this court said:
“There is excellent authority for the proposition that *26though there be actual ‘duress of imprisonment’ or illegal detention of the principal, yet if the surety has full knowledge of the circumstances attending the detention, and, notwithstanding such knowledge, voluntarily enters into the obligation, he is bound thereby. Plummer v. People, 16 Ill. 358; Huggins v. People, 39 Ill. 241; Griffith v. Sitgreaves, 90 Pa. St. 161; King v. State, 25 N. W. 519.”
See also 32 Cyc. 24; 9 R. C. L. 729, sec. 18; 6 C. J. 906, sec. 40.
The defendant surety further contends that the sheriff had no authority to take the bond in question. The only basis for this contention is the alleged illegal arrest and the alleged duress, but such circumstances are not relevant to the question. The object of the ne exeat proceedings was to keep the defendant within the jurisdiction of the court and to procure a ne exeat bond for that purpose. The sheriff is ordinarily the officer authorized to take such bonds, and in the instant case he was expressly authorized by the court to detain the defendant and release him upon the latter’s giving a bond with sureties to be approved by the sheriff. This was authority given to the sheriff to take the bond herein sued on.
The remaining contention of the defendant surety is that the bond is void as containing conditions more onerous than the law permits. The bond should, of course, be conditioned that the defendant will not go beyond the jurisdiction of the court without its permission. 14 Enc. Pl. & Pr. 326. The bond in question contained this condition. If it contains any unauthorized conditions, as to which we express no opinion, the same may be treated as surplusage. 9 C. J. 26, sec. 40.
The second amended complaint, for the reasons above indicated, states a cause of action. The judgment is reversed with directions to overrule the demurrer and for further proceedings not inconsistent with the views herein expressed.
Mr. Justice Teller sitting for Mr. Chief Justice Scott, and Mr. Justice Bailey concur.