In this action, brought pursuant to the provisions of section 2653a-■of the Code of Civil Procedure, the plaintiff seeks to have declared invalid the probate of the will of Edward Gorman, deceased. The trial resulted in a judgment declaring the paper writing produced to be his valid last will and testament, and that all parties to the .action, and all persons claiming under them subsequent to the commencement-of the action, be forever restrained from bringing or maintaining a defense in any action or proceeding based upon the -claim "that such writing is not the last will and testament of the deceased. The judgment also provided for the payment of costs to the plaintiff, to the defendant executor, and to the defendant Booney, guardian ad litem of Margaret Burns, an infant, out of the funds in the hands of the defendant executor, as such. The executor appeals from so much of the judgment as adjudges that any of the parties be paid costs and allowances out of the funds in his hands.
*886There are two forms of action in which costs are to be taken under the Code. In one they belong of course to the prevailing party; in the other they may or may not be allowed, in the discretion of the court. Sections 3228, 3229 and 3230 of the Code of Civil Procedure seem to be the only provisions affecting the questions presented. Section 3228 prescribes the cases in which the plaintiff is. entitled to costs, of course; section '3229 provides that the defendant shall have costs, of course, in case the plaintiff be not entitled thereto in the cases enumerated in the preceding section; and section 3230 provides that except as prescribed in the last two sections the court may, upon the rendering of the final judgment, in its discretion, award costs to any party. The inquiry is, does this action fall within any one of the classes described in section 3228 ? If so, the defendant as the prevailing party is entitled to costs, and no other party may have costs or allowances, either of course or by the discretionary award of the court.
The only part of section 8228 which has any bearing upon the question presented by this appeal, provides that the plaintiff is entitled to costs'of course, upon the rendering of a final judgment in his favor in “ an action, triable by a jury, to recover real property, or an interest in real property ; or in which a claim of title to real property arises upon the pleadings, or is certified to have come in question upon the trial.” If this is an action to recover an interest in real property, or one “ in which a claim of title to real property arises upon the pleadings,” as these clauses are used in the Code, the défendant being the "successful party is entitled under section 3229 to costs of course.
The character, scope and purpose of an action brought under section 2653a of the Code are fully defined* and limited by the words of the section itself. It is an action to determine the validity or invalidity of the probate of a will, and may be brought by any person interested as devisee, legatee, or otherwise, in the will or codicil, or by any person interested as heir at law, next of kin, or otherwise, in any estate any portion of which is affected by the will or codicil. The issue of the pleadings in such actions must be confined to the question of whether the writing produced is or is not the last will and codicil of the testator, or either. It must be apparent, therefore, that this is not an action to recover real property or an interest *887therein, or in which- a claim of title thereto arises upon the pleadings, as those words are evidently used in section 3228. The question of title to real estate'is a mere incident to thé action, and the judgment will determine questions which may or may not affect title to real property according as the estate affected or purporting to be affected by the will embraces real property or is made up of personalty alone. While upon the pleadings in this case it is apparent that the plaintiff claims interests of certain of the defendants, and while incidentally title;to certain real estate is involved and may be affected by the judgment, yet an issue in respect thereto does not arise upon the pleadings, for by the express language of the statute the issue in such an action is confined to the" question whether or no the writing produced is the will of the testator..
The adoption of this construction .is to be favored, because it makes for consistency in awards of .costs in actions of this character. Had there been no real property in the estate of the testator it could not, of course, have been claimed in any view that the action was one to recover real property, or in which a claim of title to real property might have arisen on the pleadings, and there could have been no claim that the action fell within the purview of section 3228 or section 3229 of the Code, with the result that costs are in the discretion of the court. It would be anomalous and to be deprecated if in one action brought pursuant to section 2653a of-the Code, where the res of the estate happened to be realty alone,, costs were awarded of course, while in an action in which the parties, procedure and issues were exactly similar, and which happened to affect the will of a testator,- who left nothing but personalty, the costs should be in discretion.
Our conclusion is-that an action of this character falls within the provisions of section 3230 of the Code, by reason of its exclusion from the provisions of section 3228 and section 8229, and heneé the costs were in discretion, "and that part of the judgment appealed from by the defendant executor may not be disturbed.
The vei'dict upon which the judgment was entered was directed by the court at the close of . the evidence, and the plaintiff has appealed from the judgment and from an order denying a motion for a new trial. We have examined the questions presented by his *888appeal, and are. of opinion that the judgment is likewise right in respect theretp;
The judgment in its- entirety must, therefore, he affirmed, without ■costs. , : ■
Hirschberg, P. J., Bartlett, Woodward' and Jerks, JJ., concurred.
Judgment and order-affirmed, without costs.