
591 P.2d 1137 (1979)
Lilly SCHWARTZ, Appellant,
v.
Eugene L. SCHWARTZ, Respondent.
No. 9857.
Supreme Court of Nevada.
March 15, 1979.
*1138 Kenneth J. Jordan, Carson City, for appellant.
Eck & Harkins, Ltd., Carson City, for respondent.

OPINION
PER CURIAM:
The principal issue presented in this appeal from the judgment below dismissing appellant-plaintiff's complaint is whether the affirmative defense of res judicata, upon which the dismissal was predicated, was properly before the court. We hold that it was not, and therefore reverse and remand for a new hearing.

THE FACTS
Appellant initiated this action, seeking amounts she claimed were due from respondent, her former husband, under a California decree of divorce entered in 1965 and a subsequent stipulation filed by the parties in Los Angeles Superior Court in 1973, as spousal and child support. Respondent's answer denied that any arrearages were due and owing; no affirmative defenses were raised.
At trial during cross-examination, appellant was asked by counsel for respondent whether she had attempted "to bring this matter to judgment in California." Appellant replied: "I think I got two judgments that he was supposed to pay and then he moved to Nevada." Counsel for respondent asked whether the judgments were for the full amount appellant was claiming in the present action. Appellant answered, "Yes," but upon questioning by the court, said merely, "I don't remember the figures, but the figures I added entered in alimony and child support, this is what Mr. Schwartz owes me." Counsel for appellant then interposed an objection to the line of questioning, which the court overruled.[1]
*1139 At the conclusion of appellant's testimony, respondent moved to dismiss the action on the basis of res judicata. Counsel for appellant argued that appellant had been confused by the legal term, and was referring to various orders to show cause. He further argued that no affirmative defense had been pleaded or previously raised. N.R.C.P. 8(c). The court, however, ruled that appellant was "bound by her own testimony", and granted respondent's motion and dismissed the complaint.

THE DEFENSE OF RES JUDICATA
Res judicata is an affirmative defense that must be specifically pleaded. N.R.C.P. 8(c). Normally, failure to plead res judicata is considered a waiver thereof. See, e.g., Tolotti v. Eikelberger, 90 Nev. 466, 530 P.2d 106 (1974). Cf. Coray v. Hom, 80 Nev. 39, 389 P.2d 76 (1964) (statute of frauds); Second Baptist Ch. v. First Nat'l Bank, 89 Nev. 217, 510 P.2d 630 (1973) (election of remedies).
In certain circumstances, however, the Nevada Rules of Civil Procedure do permit an affirmative defense to be considered, even though it has not been raised by the pleadings. See N.R.C.P. 15. As has been noted of the Federal Rules of Civil Procedure, "Doubtless, when there is no prejudice and when fairness dictates, the strictures of this rule [8(c)] may be relaxed. Under Rule 15 the district court may and should liberally allow an amendment to the pleadings if prejudice does not result." Jakobsen v. Massachusetts Port Authority, 520 F.2d 810, 813 (1st Cir.1975). See, e.g., Marschall v. City of Carson, 86 Nev. 107, 464 P.2d 494 (1970). In the case at hand, respondent made no application to the court for permission to amend, and none was granted.
Rule 15(b) does provide that "[w]hen issues not raised by the pleadings are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings." Failure to amend does not, in such circumstances, affect the result of the trial of these issues. United Tungsten v. Corp. Svc., 76 Nev. 329, 353 P.2d 452 (1960); Gershenhorn v. Stutz, 72 Nev. 293, 304 P.2d 395 (1956).
In Poe v. La Metropolitana Company, 76 Nev. 306, 353 P.2d 454 (1960), for instance, *1140 this court found that the defense of fraud in the application for an insurance policy had been tried by implied consent. The court noted that counsel for the defendant had raised the issue in his opening argument, that counsel for plaintiff had specifically referred to the matter as an issue in the case, that the factual issue had been explored in discovery, that no objection had been raised at trial to the admission of evidence relevant to the issue. See also Young Elec. v. Last Frontier, 78 Nev. 457, 375 P.2d 859 (1962) (issue virtually the "sole subject" of testimony); Whiteman v. Brandis, 78 Nev. 320, 372 P.2d 468 (1962) (evidence received without objection); United Tungsten v. Corp. Svc., supra (appellant's counsel agreed with court's characterization of the matter as the major issue in the case); Choate v. Ransom, 74 Nev. 100, 323 P.2d 700 (1958) (no objection raised to evidence or request for opportunity to refute).
Not so in the instant case. In contrast to Poe, there was no reference to res judicata as a defense, or to the factual issues involved, during pre-trial discovery, opening remarks of counsel, or at any time prior to the cross-examination of appellant. When the issue did arise, counsel for appellant was surprised, and understandably unprepared. He objected to the pursuit of the issue, once its import became clear; he specifically argued, in opposition to respondent's motion immediately following appellant's testimony, on the ground that the issue had not been raised in the pleadings. His requests to reopen for further testimony by his client, and for reservation of the court's ruling until records could be secured, merely underscored the difficulties occasioned by his lack of prior notice of the issue.
As the court said in Jakobsen v. Massachusetts Port Authority, supra, 520 F.2d at 815, "[w]hile the Federal Rules reflect a universal trend away from stereotyped pleading, they do not presage abandonment of the requirements that parties be given reasonable advance notice of the major issues to be raised." See F. James & G. Hazard, Civil Procedure § 5.5 (2d ed. 1977). The concomitant of such a requirement, and of the mandate of N.R.C.P. 1, that the rules be interpreted so as to provide for a just determination of every action, is the requirement that the party surprised by such a development be given a reasonable opportunity to respond. See Parks v. Quintana, 86 Nev. 847, 477 P.2d 869 (1970). See also MBI Motor Company, Inc. v. Lotus/East, Inc., 506 F.2d 709 (6th Cir.1974); United States v. 47 Bottles, More or Less, Etc., 320 F.2d 564 (3d Cir.1963). In this case, appellant was provided with neither reasonable notice of the issue nor an opportunity to respond.
We conclude, therefore, that the issue of res judicata was not properly before the trial court and the judgment of dismissal predicated thereon may not be upheld. We reverse and remand for a new hearing.[2]
NOTES
[1]  The full account of this exchange is as follows:

Q: [Counsel for Respondent]: Did you ever attempt to bring this matter to judgment in California?
A: [Appellant]: Yes, we've been in court lots of times.
Q: And what happened to those?
A: I think I got two judgments that he was supposed to pay and then he moved to Nevada.
Q: And did you tell 
THE COURT: Did I understand that some of this arrearage was reduced to judgment in California?
[Counsel for Respondent]: I think it all was, your Honor.
[Counsel for Appellant]: I don't have any records of that, your Honor.
THE COURT: I'll want to know more about that, [Counsel for Respondent]. I hope you'll pursue this more fully.
[Counsel for Respondent]: That's what I'm trying to obtain from the Defendant (sic).
[Counsel for Respondent]: You say you got two judgments against Mr. Schwartz in California?
A: That's right. As far as I know. If that's called judgment.
Q: And what did you do with those judgments?
A: What'd I do with the judgments?
Q: Did you collect any money on the judgments?
A: Not a bit.
Q: How much were those judgments for?
A: Exactly what was entered in the judgment.
Q: For the full amount your (sic) claiming today?
A: Yes.
THE COURT: What was that answer, please?
A: I don't remember the figures, but the figures I added entered in alimony and child support, this is what Mr. Schwartz owes me.
.....
Q: Was there anything ever done? Did Mr. Schwartz ever go to Court, you and Mr. Schwartz ever go to Court after your divorce other than those two times you just mentioned?
A: Oh, yes, we went to Court more than once.
Q: What happened in those Court proceedings?
[Counsel for Appellant]: I think I'm going to have to object unless there is some record of that. There were so many times that we're talking about, it's kind of confusing. I think the witness has already answered that the only judgments or stipulations she's mentioned are the ones that's already been offered into evidence. And besides the divorce decree, interlocutory and the final decree, that's it.
[Counsel for Respondent]: Your Honor, if this matter has already been litigated, which is something that I've just found out about, it seems to me we've got a res judicata problem and we've got an action that should have been brought on a judgment rather than on the basis of a new action for arrearages.
THE COURT: I agree. Most thoroughly. The objection is overruled.
[2]  Even if we were to rule that the issue of res judicata had been properly raised, the evidence before the court below did not conclusively establish this defense.

As has been observed, "[a]pplication of the doctrine of res judicata requires a showing that there has been a previous action between the same parties involving the same subject matter in which a final judgment on the merits has been rendered with respect to the same cause of action." Bryson v. Guarantee Reserve Life Insurance Company, 520 F.2d 563, 566 (8th Cir.1975). Since the averments of an affirmative defense are taken as denied or avoided (Jones v. Barnhart, 89 Nev. 74, 506 P.2d 430 (1973); N.R.C.P. 8(d)), each element of the defense must be affirmatively proved. United States v. Truckee-Carson Irrigation Dist., 71 F.R.D. 10 (D.Nev. 1975). The burden of proof clearly rests with the defendant. See, e.g., Rosenbaum v. Rosenbaum, 86 Nev. 550, 471 P.2d 254 (1970).
The equivocal and limited testimony of appellant, which was the only evidence upon which the order of dismissal was predicated, does not meet these standards. (The court on remand may permit either party to file an amended pleading, pursuant to the guidelines of N.R.C.P. 15(a).)
