*145By the Court,
Hawley, J.:It is claimed by appellant tliat the defendants were sureties upon the official bond of S.- Symons, as public administrator of Storey County; that as such sureties they became, and are, liable to the estate of William L. Williams, deceased, for a certain amount of money alleged to have been embezzled from said estate by said public administrator.
The only allegation in plaintiff’s complaint tending to connect the defendants, or either of them, with the subject matter in controversy, is as follows:
“ That at the general election held in the State of Nevada on the third day of November, 1868, Samuel Symons * * * was duly elected to the office of public administrator in and for the county of Storey * * * and on the nineteenth day of December, A. d. 1868, the said Samuel Symons made and executed his official bond, a copy of which, with the indorsements thereon, is hereunto annexed, marked ‘Exhibit,A,’ and made a part of this complaint; that on the twenty-second day of December, A. D. 1868, the said Samuel Symons did qualify as such public administrator, and on the date last aforesaid the said official bond was duly approved by the board of county commissioners, in and for the said county of Storey, and the same was * * * filed for record in the office of the county clerk * * * and was * * * duly recorded in the said office, according to law.”
Exhibit “A” contains the names of the. defendants as sureties.
The defendants when served with process appeared separately and demurred to said complaint upon the ground, among others, that: “The complaint does not state facts sufficient to constitute a cause of action either in favor of said plaintiff against all or any of the defendants, or against all or any of the defendants in favor of any one.”
The demurrers were overruled by the court, and, after issue joined, the case was tried before the court without a jurp-
All the evidence offered by the plaintiff was admitted *146subject to the defendants’ objection, that the same was irrelevant to any issue raised by the pleadings.
No evidence was offered by the defendants.
The court rendered a judgment in favor of defendants for their costs.
The statement on motion for a new trial shows that the court rendered this judgment upon the ground: “That tho plaintiffs complaint nowhere stated or alleged that defendants had ever executed the official bond of Samuel Symons as public administrator, and that otherwise the court found a good cáuse of action on the merits.”
After the court had rendered its decision plaintiff’s counsel “asked leave to so amend his complaint as to allege, in terms, that defendants had executed the said bond in accordance with the proofs in the case. The court declined to allow plaintiff to so amend his said complaint for the reason that it was too late, because the case had been submitted and decided.”
Upon this statement of facts it is evident: First, that the court erred in not sustaining the demurrers interposed by the defendants; second, that upon the trial, or at least before rendering its decision, the court became convinced of its error, for it rendered a judgment in favor of the defendants on the very ground upon which it ought to have sustained the demurrers in the first instance. The plaintiff was misled by this action of the court.
If the demurrers had been sustained, the plaintiff would then have had an opportunity to amend his complaint so as to state a cause of action against the defendants; but having overruled the demurrers, the plaintiff had the right to anticipate that the court would adhere to its ruling, and he ought not to be compelled to incur the additional expense of another action.
We are of opinion that the court erred in refusing to grant a new trial for the purpose of allowing plaintiff to amend his complaint.
This conclusion is fully sustained by the decision of the supreme court of California in Carpentier v. Small. The action was ejectment to recover certain lands. The de-*147fenclants undertook, in their answers, to set up a claim — to have the value of certain improvements set off against the damages. On the trial they offered evidence in support of this branch of their answers, to which the plaintiffs objected on the ground of “ incompetency and immateriality, because no sufficient foundation for such evidence was laid in the pleadings.”
This objection was overruled and the evidence admitted.
In the findings of the court the conclusion of law upon this point was: “ That under the pleadings none of the defendants are entitled to have the value of these improvements allowed as a set-off against the damages for withholding the property.”
Upon this state of facts the court said: “After the testimony was admitted, then, the court, when the findings came to be drawn, and after further reflection, must have come to a different conclusion from that entertained when the evidence was admitted. This change of opinion may have worked great injustice to the defendants. They made an attempt to set up a valid claim for improvements in their answers. The plaintiff did not demur for insufficiency, but did raise the question on that ground by objection to the introduction of evidence under it. The court then deemed the answer sufficient and admitted evidence. The ruling rvas with the defendants on that point. There was, therefore, in view of the ruling of the court, no occasion to amend, and no leave to amend Avas asked. Had the ruling been the other Avay the defendants might have obviated the objection by amendment. But, relying on the ruling, the subsequent change in the view of the court has deprived them of an opportunity to correct the defect in their pleadings, and they may lose the value of their improvements in consequence of the action of the court, when it was too late to remedy it. We think the defendants ivere entitled to rely upon the ruling, and since a different view finally prevailed, that they should have an opportunity to obviate the defect in the pleadings, otherwise great injustice may result.” (35 Gal. 362.)
We are asked by appellant to examine the testimony and *148decide this case upon its merits. For obvious reasons this would be improper.
The defendants, relying upon their demurrers and objections to the testimony offered by plaintiff, made no defense upon the trial. They are entitled to their day in court for the purpose of making a defense upon the merits. It would be as great an act of injustice to deprive them of the opportunity to be heard • as it would be to deprive plaintiff of the opportunity of correcting his pleading.
The testimony having been improperly admitted, under the pleadings, will not be considered for any purpose whatever. The judgment of the district court and its order refusing a new trial are reversed, and the cause remanded for a new trial, with leave to plaintiff to amend his complaint.