Deemer, J.
The bond contained the usual conditions "to appear and answer the indictment, and abide the orders and judgment of the court, and not depart without leave of same.” This undertaking is a continuing one, and can only bo discharged by the surrender of the accused as' provided by statute (Code, sections 5528, 5529), or by obtaining leave of court for the accused to depart. State v. Brown, 16 Iowa, 314. There is no pretense that Houser surrendered the defendant to the sheriff in accordance with the statute, and no claim that the court directly discharged him. It is said, however, that what occurred at the time judgment was pronounced amounted to a discharge by the court. The record discloses the following facts: Judge Remley, who held the term of court at which Zimmerman pleaded guilty, fixed a day for sentencing all who had been convicted of crime. All the prisoners who were not out on bond were brought into the court room by the sheriff, and were seated on the west side of the room, with the sheriff standing near them. Those who were out on bond were in another part of the room. They were first sentenced, and the judge said to the sheriff that he wished him to take charge of them as soon as sentenced. Zimmerman was present, and, as soon as sentenced, went over, and took his seat with the prisoners who were not out on bond. The sheriff knew that Zimmerman was *7ordered into his custody. After the sheriff had thus taken Zimmerman, the trial judge gave him (Zimmerman) permission to g0' and get the money with which to pay the fine, and notified the sheriff of his order. The sheriff says that he would not have permitted Zimmerman to get from under his control but for this order and permission of the court, 'l'he judge also told the sheriff that all who received their sentence must pay their fines or be in jail before court finally adjourned. Instead of getting the money to pay his fine, Zimmerman left the state, and joined the “Rough Riders.” Thereafter, and before the adjournment of court, an order was amide, requiring Zimmerman to appear, and .surrender himself to perform judgment. As ho did not appear, the order of forfeiture was entered. The appearance docket shows the satisfaction and cancellation of the bail bond on the day Zimmerman was sentenced. The bond, as wo have said, was in the statutory form, conditioned to “appear and answer the indictment, and submit to the order and judgment of said court, and not depart without leave of same.” Such a bond docs not obligate the surety to pay the fine imposed. In a sense, the surety is simply a jailer for the defendant, charged’with the duty of producing him when his personal presence is required, or of surrendering him in execution of the judgment. When once that duty is performed, the liability of the surety is extinguished. And whenever the court orders a defendant out on bail into the custody of the sheriff in execution of the judgment pronounced against him, and the sheriff, in pursuance of that order, takes possession of the prisoner, the liability of the surety ceases, for he has lost all control of his principal, and can no longer direct his movements. In the instant case there can be no doubt that the court ordered Zimmerman into the custody of the sheriff, in execution of the. judgment., and that the sheriff took- him into custody pursuant to that order. Ills subsequent departure was with leave of court, for the purpose of obtaining the money whereby to pay his fine, and there was no *8breach of the conditions of the bond in his failure to return. The surety did not undertake to return Zimmerman after his departure, with leave of court, under the circumstances disclosed by the record before us. In Moorehead v. State, 38 Kan. Sup. 489 (16 Pac. Rep. 957), where a defendant in a criminal case was present when sentence was jn’onounced against him, and was immediately thereafter taken into- the custody of the sheriff, and thereafter departed with leave of the court and the sheriff, it was held that the surety on a bond conditioned that he would appear on the first day of the regular term, and not depart the same without leave, was discharged. The court, by Horton, I., said: “If these are the facts, then his surety is discharged from liability on the recognizance, as it is not conditioned that the defendant or his surety should pay or satisfy the judgment.” See, also, McGarry v. State, 37 Kan. 9 (14 Pac. Rep. 491; Com. v. Coleman, 2 Metc. (Ky.) 382; Lyons v. State, 1 Blackf. 309; Towns v. Hale, 2 Gray (Mass.), 199, also adds some support to our conclusions. The cases relied on by the attorney general are not in point. In each of them the surety was claiming a discharge by reason of his surrender of the defendant, and in each it was held there was no discharge, because the surety had not complied with the statutes relating thereto. See State v. Kraner, 50 Iowa, 576; State v. Baldwin, 78 Iowa, 738. The trial court should have set aside the order of forfeiture, and its order is reversed.
Granger, O. J"., not sitting.