The plaintiff entered into a contract -with one L. U. Grant, October 19, 1899, for the construction by the latter of a building upon its land at the agreed price ■of $16,300, and at the same time the said Grant as principal and the defendant as surety executed to the plaintiff a bond if indemnity in the sum of $4,075, conditioned that Grant .should faithfully perform the said contract and deliver the building to the plaintiff within the contract time for its completion, free from all liens, demands and claims, and should pay to the persons performing labor or furnishing materials for the construction of the building the value thereof. The ■contract provided that the building should be completed with*340in one hundred arid fifty working days from the date thereof, and that the payment of the contract price should he made in installments as the work progressed, in sums equal to seventy-five per cent of the value of the work done and materials furnished, as estimated on the first and fifteenth days of each month, and the balance,-to wit, twenty-five per cent of the contract price of $16,300 ($4,075) thirty-five days after the completion and acceptance of the work. After the execution and recording of the contract the plaintiff and Grant made certain alterations and changes therein, by which the cost of the building was increased in the sum of $315, and agreed that the said additional cost should be paid at the same times and in the same manner as payments under the original contract. During the progress of the work payments were made to Grant upon certificates of the architect on account of installments due on the contract, amounting to $12,138.85. Before the building was completed Grant abandoned the contract, and the plaintiff completed the construction of the building and expended therefor $641.23. After its completion certain parties, who had furnished materials and performed labor for Grant in its construction, filed claims of lien therefor, amounting to about $7,500, and subsequently brought actions in the superior court for their enforcement. These actions were, by an order of court, consolidated, and the plaintiff filed its answer thereto, alleging that the building was not subject to liens exceeding in the aggregate $3,834.92, and offering to deposit that sum in court for their satisfaction. Upon the trial of the cause the court found that that was the amount due from the plaintiff to Grant upon the contract at the commencement of the action; and upon its order the sum was deposited in court for the said claimants, and the court thereupon rendered its judgment that the said liens were thereby fully satisfied. In this litigation the plaintiff employed certain attorneys, for whose services he paid $500, and incurred certain costs, amounting to $27. The present action is brought to recover these amounts from the defendant. A demurrer to the complaint was sustained, and from the judgment entered thereon the plaintiff has appealed.
*341The bond of the defendant makes no reference to the provisions of section 1203, Code of Civil Procedure, and the rulings of the supreme court in reference to that section, upon which the objection to the validity of the bond was based, are inapplicable. It is unnecessary to consider the effect of the provision in the bond for the payment by Grant to the laborers and materialmen, since the complaint herein is limited to the rights of the plaintiff alone. The condition of the defendant’s obligation is the failure of Grant to faithfully perform his contract and deliver the building to the plaintiff free from all liens, claims and demands. Although it is alleged that Grant did not complete the building, but abandoned his contract when it was uncompleted, and the plaintiff was compelled to complete the same, the plaintiff does not show that it has sustained any damage thereby, or make any claim against the defendant therefor. The total amount of the contract price for the building and for the extra work is $16,615. Deducting from this $12,138.85 paid to Grant upon the certificates of the architect as the work progressed, and $3,834.92 determined by the court to be in the plaintiff’s hands applicable for the discharge of the liens upon the building, there remains $641.23, the amount paid by the plaintiff for the completion of the building, thus showing that the plaintiff sustained no pecuniary damage by reason of Grant’s failure to complete his contract. The basis of the defendant’s obligation which the plaintiff presents in support of its right of action is the failure of Grant to deliver the building free from liens, and upon this point it alleges that upon the completion of the building the sum of $3,834.92 was chargeable against the building for liens and claims-thereon; and it also alleges that upon the trial of the action to enforce the liens the court found that the lien claimants were entitled to this amount of money, and that upon depositing that amount in court for the discharge of said liens the court rendered its judgment that the liens were fully satisfied.
1. The alteration of the contract as set forth in the complaint had the effect to release the surety from its contract of indemnity. There is no allegation in the complaint supporting the suggestion in the brief of the appellant that the original contract contained a provision authorizing changes *342to be made therein; nor is it alleged that the changes were made with the consent of the defendant. For the purpose of determining the sufficiency of the complaint as against the demurrer we can consider only matters therein set forth. There is no principle of law better settled than that a surety has the right to stand upon the very terms of his contract, and that any alteration in the terms of the principars contract, made by the parties thereto without his assent, will have the effect to discharge him from all liability. By such alteration the contract ceases to be the one for which he became surety, and the extent of such alteration, or whether his lia- • bility will be increased or diminished thereby, is immaterial. Having the right to determine in the first instance whether he will become such surety or not, he has the right to be consulted upon the terms proposed for any variation of his obligation, and if made otherwise his obligation is extinguished, The principle of this rule is discussed in Brandt on Suretyship, section 106. (See, also, Miller v. Stewart, 9 Wheat. (U. S.) 680; Bethune v. Dozier, 10 Ga. 235.) In this state the legislature has declared in section 2819, Civil Code, that if by any act of the creditor without his consent the original obligation of the principal is altered in any respect he is exonerated. That the alterations in the contract agreed upon between the plaintiff and Grant had the effect to alter the obligation of the surety is apparent. A greater length of time was thereby required within which to finish the building, and a greater amount of labor and of expenditure incident thereto than that for which the defendant had agreed to indemnify the plaintiff. Because of these alterations the defendant ceased to be liable on its contract. (Judah v. Zimmerman, 22 Ind. 388; O’Neal v. Kelley, 65 Ark. 550, [47 S. W. 409]; Eldridge v. Fuhr, 59 Mo. App. 44; Beers v. Wolff, 116 Mo. 179, [22 S. W. 620].) The expression found in the opinions in some cases that the surety is discharged by any “material” alteration of the contract has reference to such an alteration as will merely vary the form of the contract without changing its substance, but does not include such an alteration as will increase the obligation for which the indemnity was given. In O’Neal v. Kelley, 65 Ark. 550, [47 S. W. 409], the in*343creased cost of the alteration was $25, and in Beers v. Wolff, 116 Mo. 179, [22 S. W. 620], where the contract price was $31,000, the cost of the alterations was $231. It cannot be said that an alteration which cost upward of $300, as in the present case, is not material. Nor can the court say that if this additional cost had been included in the original contract the defendant would have been willing to bind itself as surety for its performance.
2. The contract with the plaintiff on the part of Grant to deliver the building free from all liens, claims, and demands is to be construed as limited to such liens and demands as can bé enforced against the building, and not as including claims of lien which are unauthorized or invalid, or for which the claimants have no right of recovery; and the obligation of the defendant as surety for Grant has the same limitation. Unless the plaintiff has been compelled to pay a greater sum of money to free the building from the liens than the unpaid amount of the contract price for its construction it has suffered no damage. By its contract with Grant it agreed to retain from him the sum of $4,075—the exact amount of the defendant’s agreement of indemnity—until thirty-five days after the completion of the building. This was an additional security in its hands for the faithful performance by Grant of his contract, including the delivery of the building free from liens, and the defendant was entitled to have this amount of money applied by the plaintiff toward the satisfaction of the claims of lien for which it had been retained. Under the well-established rule in this state, if the “owner” in a building contract observes the conditions of the contract on his part to be performed, the amount of liens against his property cannot exceed the amount of the unpaid portion of the price agreed upon for constructing the building; and in the present case when the building was completed the plaintiff had in its hands the full amount for which liens were afterward found to be valid charges against the building. The fact that liens for a greater amount were claimed and filed, and for the enforcement of which actions were brought did not in any respect enlarge the liability of the defendant. The record does not disclose the nature of these claims of *344lien, or the circumstances under which they were filed, or for which the claims were made; but, as the court found that the amount chargeable against the building was no greater than the unpaid amount of the contract price, it must be assumed that for any excess of that price these claims had no valid foundation. It was therefore within the power of the plaintiff to satisfy the amount of all the valid liens against its building by appropriating therefor the amount in its hands; and in view of the rights of the defendant as a surety, and the plaintiff’s obligation toward it, it was the duty of the plaintiff to do so before it could call upon the defendant for any relief. Good faith toward the defendant required the plaintiff to discharge the liens with the money then held by it for that purpose. The contract of the defendant did not extend to or include any trouble or expense which the plaintiff might incur in the performance of its own duty. Before the expiration of the thirty-five days from the completion of the building the plaintiff knew or could have ascertained the amount of liens claimed thereon; and as it knew that the amount of the unpaid portion of the contract price was the limit for which any liens could be enforced, it was in its power to satisfy these liens by appropriating the money in its hands therefor. If, instead of so doing, it chose to await actions for their recovery, and thereby incur additional expense, it was an act of its own choosing for which the defendant is in no wise responsible. Whatever expense was incurred by reason of the attempt of the claimants to enforce liens to which they were not entitled is not embraced in the defendant’s contract of indemnity, whether such attempt was to enforce liens for a greater amount than they were entitled to recover, or liens for which they had no claim whatever. The plaintiff therefore is not entitled to recover from the defendant for the services of its attorneys in defending these actions, or the expenses incurred therein, and the court properly sustained the demurrer to the complaint.
The judgment is affirmed.
Cooper, J., and Hall, J., concurred.