BASKIN, J.
It is alleged in the complaint “that on the eleventh day of May, 1895, the defendant, W. E. Travis, had a contract with the United States Government, in due form of law, for the transporting of the United States mails on a mail route known as ‘No. 43349,’ from Belle Plaine, in the State of Iowa, to Irving, in said State of Iowa, which contract ran from the first day of July, 1895, to the thirtieth day of June, 1899, both dates inclusive, and had obtained permission from the United States to sublet the work under said contract; and on the said eleventh day of May, 1895, the said defendant, W. E. Travis, entered into a contract in writing with this plaintiff, copy of which is hereto attached, and marked ‘Exhibit A,’ by the terms of which he sublet to this plaintiff the work of carrying the mails over said route from *67tbe first day of July, 1895, to tbe thirtieth day of June, 1899, both dates inclusive, and by the terms of which agreement the plaintiff agreed with the defendant to carry the United States mail on said route, from Belle Plaine to Irving and bach, two times a week during the term of said contract; and the defendant undertook and agreed to pay to plaintiff for such service the sum of $79.50 per annum. It was further provided in said contract that, in case the Postmaster-General of the United States should require said mails to be transported over said route sis round trips a week, the plaintiff would so transport said mails in accordance with such requirement, and in that case the defendant would pay to the plaintiff for such service the sum of $238.50 per annum.” The answer, after a denial of each and every allegation of the complaint, except as thereinafter admitted, contained the following allegation: “And for a further answer, and as an affirmative defense to the plaintiff’s alleged cause of action, this defendant alleges.” And following this the answer, in substance alleges that the contract between the Government and the defendant was for carrying the mail over said route three times per week from July 1, 1895, to the thirtieth day of June, 1899, for the sum of $84 per year, and that it was therein provided that additional service might thereafter be required by the Postmaster-General, and that the defendant would be allowed a pro rata increase of compensation for such additional service, and that the defendant might, by permission of the Postmaster-General, and in accordance with all of the conditions of said contract, sublet the same; that thereafter, and on or about the eleventh day of May, 1895, this defendant’s agent and the plaintiff entered into a verbal agreement, to be reduced to writing, whereby the said plaintiff agreed with this defendant to carry the mail over said route No. 43349, three times per week from the first day of July, 1895, to June 30, 1899, in accordance with the permission which had been granted to this *68defendant by tbe Postmaster-General of tbe United States, and in full compliance with tbe laws and regulations, and subject to all tbe requirements of this defendant under bis said original contract with tbe United States Government, for tbe sum of $79.50 per annum for said service at three times a week, or, in case said service should be increased, for an additional amount not to exceed a pro rata increase of compensation, and, in ease tbe service was required by tbe Postmaster-General to be six times per week, for tbe sum of $159 per annum; that it was well known by bis said agent and said plaintiff that this defendant’s contract with tbe United States Government was to carry tbe said mails over said route, during tbe time mentioned, three times per week, but that in drawing up said contract, through accident and mutual mistake of tbe parties, it was recited therein that this defendant’s contract with tbe United States Government was to carry tbe mail over said route two times per week, when it should have stated three times per week, and said contract further contained a promise on behalf of this defendant to pay to tbe plaintiff tbe sum of $79.50 per annum for two round trips per week, when it should have stated, and would have stated except for accident and tbe mutual mistake of tbe parties, tbe sum of $79.50 per annum for three round trips per week; and, further, said contract contained a promise on behalf of this defendant to pay to plaintiff tbe sum of $238.50 per annum for six round trips per week, when tbe same should have contained the provision for tbe payment of $159 per annum for six round trips per week, and would have so recited except for tbe said accident and mutual mistake of tbe parties, Tbe prayer of tbe answer is as follows: “Wherefore this defendant prays judgment that tbe said written contract be reformed on account of tbe accident and mutual mistake of tbe parties, and that tbe same be made by tbe decree of this court to conform to tbe true intent and agreement of said parties, and that plaintiff take *69nothing by his complaint, and the defendant have such further relief as is just and equitable, and for his costs.” It is conceded by both parties that the service was increased, under the requirement of the postmaster, to six times per week. The plaintiff made no reply to thé answer.
The plaintiff was permitted, over the objection of the defendant, to introduce, in chief, testimony of witnesses tending to disprove the alleged mutual mistake in drafting the written contract. The defendant, when plaintiff rested, moved for judgment upon the cross complaint on the ground that there was no reply thereto. The motion was overruled, and the plaintiff recovered a judgment for $358.64 and costs. The refusal of the trial court to sustain this motion is assigned as error. The appellant’s contention in respect to this subject, as stated in the brief of his counsel, is as follows: “The appellant’s first contention is that the court should have rendered judgment in favor of the defendant, reforming the instrument sued on, for the reason that the plaintiff had not replied to or controverted in any way the defendant’s counterclaim, thereby admitting all of the facts as true. It is true that the pleading was not designated as a 'counterclaim’ or 'cross-complaint,’ but the affirmative allegations, together with the prayer for relief stated a cause - of action in favor of the defendant and against the plaintiff, which, if set up in a complaint, would have been a foundation for a judgment. Our contention is that the court looks at the matter contained in the pleading and the prayer, and, regardless of how the pleading may be designated, relief is granted in accordance with the allegations in the answer, and not because it may be entitled by any peculiar name. If the pleading is merely an answer, we are not entitled to any relief under it. If, however, the allegations are sufficient to make it a counterclaim, then we are entitled to relief, and a reply is necessary.” In answer to this, counsel for the respondent contend that *70’’the new matter set up in the answer was, in terms, pleaded merely as a defense to plaintiff’s cause of action, and was not, therefore, admitted by the failure of the plaintiff to traverse the same jn a replication. There was no objection made before or at the time of the trial by plaintiff to the form of the answer. In the case of Perego v. Dodge, 9 Utah 3, 33 Pac. 221, 222, the answer denied the ' material allegations of the complaint, and alleged grounds for affirmative relief, but did not, in expressed form, contain a cross-complaint or counterclaim. The court, in its opinion, said: “The appellant contends that the trial court erred in adjudging that the respondents were the owners of the premises in controversy, for the reason that respondents filed no counterclaim or cross-complaint. We do not think this contention can be sustained. No objection was taken to the answer before judgment, and the respondents alleged facts which seem to entitle them to affirmative relief under section 2326, Revised Statutes United States. It is not what a pleading is called Tghich determines its character, but the facts which it sets up. Its character-must be determined by the court. The relief granted seems to have been proper, under the facts stated and the prayer of the pleadings.” On an appeal of the case (163 U. S. 160-164, 16 Sup. Ct. 971, 41 L. Ed. 113), this view was expressly affirmed. In the following cases it is held that it is immaterial what the defendant called his pleading; whether he designated it an “answer” or “cross-complaint,” its "character will be 1 determined by the court. It is the facts set up in the pleading which make it an answer or cross-complaint. Holmes v. Richet, 56 Cal. 307, 38 Am. Rep. 54; Meeker v. Dalton, 75 Cal. 154, 16 Pac. 764; Gregory v. Bovier, 77 Cal. 121-124, 19 Pac. 232; Miller v. Fletcher, 100 Cal. 143-148, 34 Pac. 637; Wittenbrock v. Parker, 102 Cal. 93-106, 36 Pac. 374, 24 L. R. A. 197, 41 Am. St. Rep. 172; Jones v. Hathaway, 77 Ind. 14; Harness v. Harness, 63 Ind. *711; Bank v. Carr, 49 Iowa 359; Ware’s Adm’rs v. Bennett, 18 Tex. 806. If tie written contract, tbrougb the mutual mistake of tbe parties, fails to substantially express wbat they intended, a court of equity will, in a proper action, correct the mistake, and by decree reform the contract 2 so as to make it conform to the real intent of the parties. Tinder our Code of Civil Procedure, this may be done either in an action instituted for that purpose, or in an action based upon the contract as written, on a counterclaim in the nature of a .cross-complaint. In the latter instance the defendant becomes an actor in respect to the matter presented by him, and the counterclaim must contain the essential aver-ments of a bill in equity, and should be first passed upon by the court. In such instances “each party is at once a plaintiff and defendant in the same action.” Phil. Code Pl., secs. 249-260; 7 Enc. Pl. and Prac., 807-810; Kahn v. Mining Co., 2 Utah 174-195; Kimball v. McIntyre, 3 Utah 77, 81, 1 Pac. 167; Steele v. Boley, 7 Utah 64, 67, 24 Pac. 755. Parol evidence is admissible to contradict or vary the terms of a written contract only in an action in which it is specifically alleged, either in the complaint, or an equitable 3 counterclaim in the nature of a cross-complaint, that it was obtained by fraud or made through mistake. Irving v. Cunningham, 66 Cal. 15, 4 Pac. 766; Casgrain v. Milwaukee Co., 81 Wis. 117, 51 N. W. 88. And when, as in this case, its reformation is sought upon an equitable counterclaim, specifically setting out that it was made through mistake, it must stand as written (Casgrain v. Milwaukee Co., supra) until it is modified; and the equitable counterclaim only becomes available as an equitable defense to an action on the written contract after its modification has been decreed by the court (Phil. Code Pl., sec. 256 et seq.; Bliss, Code Pl., sec. 348 et seq.). This follows from the well-settled practice that the equitable counterclaim must be first passed upon by the court, because “the determination of the *72equitable issues by the court iu favor of the defendant would put an end to the litigation, and obviate the necessity of trying the legal issues involved.” 7 Enc. Pl. and Prac., 810; Steele v. Boley, 7 Utah 64, 67, 24 Pac. 755. The following quotation from section 349, Bliss, Code PL, tersely states the rule: “Under the Code, instead of being compelled to resort to an original equitable proceeding, the defendant, when sued upon the agreement, may seek the reformation by means of an equitable counterclaim. There can be no reform in the supposed case until the counterclaim is established, and a judgment accordingly. By a direct proceeding in the nature of a cross-bill the defendant obtains an order reforming the instrument. Until it is reformed, it is the only evidence of the contract. After it is reformed, it shows that the plaintiff has no cause of action. Hence, it is reasonable to say that in such case there can be no defense until the instrument is reformed — -until the defendant has obtained an affirmative judgment upon his counterclaim.” It is also stated in section 257, Phil. Code Pl., as follows: “Sometimes a defendant must have affirmative equitable relief touching his defense, in order to make it available against the plaintiff’s claim. Eor example, an action; is brought upon a written contract, by the terms of which the defendant’s liability is clear, but the part of the writing from which his liability arises was inserted by mistake or fraud. The real contract would not show such liability, but the writing does; and upon the trial of an issue as to what were the terms of the contract, the writing itself is the best evidence. The defendant’s real defense in such case is that he did not make the promise sued on. But he can not deny that he made the writing, and the writing shows that he made the promise, and it is the exclusive evidence upon that point. It is evident that, to make his real defense available, the defendant must first impugn the writing. This he may do by way of a cross-action, in the nature of a bill in equity, alleging the real *73contract, the mistake or the fraud in the writing, and asking that it be reformed so as to conform to the intention of the parties and express their real contract. Such demand of affirmative relief is not of itself a defense to -the plaintiff’s claim. It is simply to prepare the defendant to maintain and make available his real defense — non assumpsit. Formerly a defendant in such case was driven to an independent suit in equity to reform the writing; but under the new procedure, which authorizes a defendant to assert equitable cross-demands as well as equitable defenses, he maj have the affirmative relief, and assert his defense dependent thereon, in the same action.” In section 259 this author further states that “in such cases the real defense is dependent, uot for its assertion, but for its establishment, on the correction of the alleged mistake.” Section 2981 of the Eevised Statutes provides: “If the plaintiff fails to demur or reply to the counterclaim, the same shall be deemed admitted.” Section 2996 provides that “each material allegation of new matter in the answer not controverted by the reply, where a reply is required, must, for the purposes of the action, be taken as true.”
In view of these provisions, the point of contention under consideration hinges upon whether the new matter alleged in the answer constitutes a counterclaim, and - is admitted by the plaintiff’s failure to traverse the same in a reply. In the motion for judgment it is designated as a “cross-complaint.” "While it constitutes a cross-demand, and is in the nature of a cross-complaint, and under the provisions of section 3231 of the Compiled Laws of 1888, which permitted a cross-complaint to be filed against both the plaintiff and a co-defendant, might have been properly designated as such, as that section has been amended and superseded by section 2974, Eevised Statutes 1898, the provisions of which do not authorize the filing of a cross-complaint, except by the defendant against a co-defendant, when the former has a cause *74of action against tbe latter affecting tbe subject-matter of tbe suit, tbe new matter of tbe answer does not, within tbe meaning of the Civil Code, constitute a cross complaint. The mere assertion of tbe mistake set up in tbe answer is not itself a matter of defense- to the action, and becomes so only upon tbe reformation of tbe written contract.
This brings us to the question whether the matter set up in the answer constitutes, under the provisions of the Code, a counterclaim, which, if not controverted by a reply, must, for the purposes of the action, be taken as true. Section 4 2968 of the Revised Statutes provides that the answer must contain (1) a general or specific denial of each material allegation of the complaint, etc.; and (2) a statement of any new matter constituting a defense or counterclaim. Section 2969 is as follows: “Counterclaim Defined. The counterclaim mentioned in the last section must be one existing in favor of a defendant and against a plaintiff, between whom a several judgment might be had in the action, and arising out of one of the following causes of action: (1) A cause of action arising out of tbe transaction set forth in tbe complaint as tbe foundation of the plaintiff’s claim, or connected with the subject of tbe action.” We are clearly of tbe opinion that tbe new matter alleged in the answer and cross-complaint meets all of the requirements of a counterclaim, as above defined by said section, and, as they were not controverted by a reply, must, for the purposes of the action, like the material allegations of a complaint which are not controverted by the answer, be taken as true. In Smith v. Faust, 1 Utah 90, it is held that, “when the answer fails to put in issue tbe allegations of the complaint, the plaintiff, on motion, is entitled to recover upon the pleadings, without offering any testimony.” In Dickert v. Weise, 2 Utah 350-354, the court said that: “Where . . . there is no issue raised by the answer, we do not deem that any findings are necessary; there are no reasons for any; the pleadings show *75tbe facts.” In Dolly v. Good, 38 Cal. 287, the court held that, “where the answer fails to deny any of the material allegations of the complaint in such a form as to put the same in issue, the plaintiff is entitled to judgment on the pleadings.” This practice is well settled in this State, in California, and other States having Codes of Procedure like ours. A filing of an equitable counterclaim in an action at law is, in effect, the institution of an independent action in equity, in which the defendant becomes an affirmative actor, and is the plaintiff. It follows that the' defendant is 5 entitled to the same relief, when the material allegations of the counterclaim are not controverted by a reply, that the plaintiff in an original ease is entitled to, when the material allegations of the complaint are not put in issue by the answer, and it is so held by the authorities. 11 Enc. Pl. and Prac., 1035; 6 Enc. Pl. and Prac., 76, and eases cited in the notes. The motion for judgment should have been granted.
•It appears from the allegations of the complaint and the findings of the trial court that the defendant has paid to the plaintiff the amount due under the contract, when it is modified in accordance with the allegations of the answer. It is ordered that the judgment be reversed, with costs, and that the case be remanded, with instructions to the court below to enter a decree reforming the written contract in accordance with the prayer of the equitable counterclaim, and awarding to the defendant his costs, and that the plaintiff take nothing under his complaint.
MINER, C. J., and BARTON, J., concur.