delivered the opinion of the court.
This is an action against the principal and surety upon a bail bond. The condition of the bond was that the principal, a defendant in a criminal case, be and appear “at the District Court * * * on the 29th day of February, 1920, and from day to day and term to term thereafter, and remain at and abide the order of said court, and not depart the court without leave, then and there to answer unto a certain information,” etc.
The scire facias alleges, among other things, that the *517cause was from time to time continued, “and eventually continued to the third day of May, 1920,” and that on that date “the defendant appeared not but wholly made default.”
In the amended answer to the scire facias, it is alleged, as one of the defenses, that:
“* * * prior to the said third day of May it was formally agreed between the District Attorney through one of his duly accredited deputies and the attorney for the defendant Dan B. Southard that the said case against the said Southard when it should be called on the said 3rd day of May, 1920, would be continued to a later date, and shortly after the incoming of Court on said date last aforesaid, the District Attorney * * * did formally move for the continuance and had said case continued to a later date certain, pursuant to the agreement which had theretofore been made for such continuance.
“That * * * after the District Attorney * * * agreed that the case would be continued as aforesaid, the said defendant was advised by his attorney that it was not necessary for him to be present on the said third day of May, 1920.
“That * * * the said defendant * • * * did rely upon said agreement * * *.”
To the amended answer, and to the above mentioned defense, the People interposed a demurrer, which was sustained. Error is assigned to the trial court’s sustaining this demurrer.
Judgment was entered against the principal and surety, and they bring the case here on error.
All the material allegations of the defense are, for the purposes of the demurrer, to be taken as true. Tanquary v. The People, 25 Colo. App. 531, 535, 139 Pac. 1118; Smith et al. v. People, 67 Colo. 452, 184 Pac. 372, 7 A. L. R. 392.
The Tanquary case is cited in support of the text in 6 C. J. 1033, where it is said:
“In so far as bail have a legal right to rely upon the acts or declarations of the prosecuting attorney in the premises, *518and they are induced thereby to so act that their rights would be .otherwise materially prejudiced under their bond or recognizance, they are not liable to forfeiture of bail.”
In People v. Morstadt, 101 Cal. 379, 35 Pac. 1007, it was held that a continuance before the hour for appearance excuses appearance at such hour. In the Smith case, above cited, this court said: '
“It is plain that the purpose of a recognizance is merely to insure the presence for trial of a person accused of a bailable offense. The enriching of the public treasury is no part of the object at which the proceeding is aimed.”
Continuances may be, and generally are, granted by the court where both parties agree thereto. The bail in the instant case had the right to assume that the district attornej^ would carry out his agreement to move for or consent to a continuance, and had good cause to believe that the case would be continued. He relied on the agreement, apparently in good faith. Under the circumstances as made to appear in the pleadings, it would be inequitable to forfeit the bond.
We are of the opinion that the amended answer states a good defense and that it was error to sustain a demurrer thereto. The judgment is reversed, and the cause remanded for further proceedings consistent with the views herein expressed.
Mr. Justice Scott, sitting for Mr. Chief Justice Garrigues, and Mr. Justice Bailey concur.