
493 P.2d 296 (1972)
Constance M. LIGHTHOUSE, Appellant,
v.
GREAT WESTERN LAND & CATTLE CORPORATION, a Nevada Corporation, Respondent.
No. 6553.
Supreme Court of Nevada.
February 3, 1972.
Stewart, Horton & McKissick, Reno, for appellant.
Robert R. Herz, Reno, for respondent.

OPINION
THOMPSON, Justice:
This appeal is from a summary judgment in favor of the respondent. The district court believed that our holding in Great W. Land & Cattle Corp. v. Sixth Judicial District Ct., 86 Nev. 282, 467 P.2d 1019(1970), barred the prosecution of this case. We there held that NRCP 41 (e) compelling the dismissal of an action not brought to trial within five years applies to a counterclaim as well, and prohibited the district court from proceeding to trial upon such a counterclaim. That court honored our writ, dismissed the counterclaim, but without prejudice. Its exercise of discretion in dismissing without prejudice was not challenged by appeal in that case. Cf. Lindauer v. Allen, 85 Nev. 430, 456 P.2d 851 (1969). Since the statute of limitations had not run against the claim for relief asserted in the counterclaim, the successor in interest of the counterclaimant commenced the present action in the Second Judicial District Court asserting the identical claim.
Rule 41(e) was amended in 1964 to provide that a dismissal thereunder "is a bar to another action upon the same claim for relief ... unless the court otherwise provides." The amendment applies to all dismissals for want of prosecution and apparently was in response to Dubin v. Harrell, 79 Nev. 467, 386 P.2d 729 (1963), where we held that a discretionary two-year dismissal barred a subsequent action upon the *297 same claim. It is now clear that the dismissal of an action or counterclaim not brought to trial within five years is mandatory, but that the district court retains discretion to decide whether the dismissal shall bar another action upon the same claim. Indeed, this precise point was decided in Lindauer v. Allen, 85 Nev. 430, 456 P.2d 851 (1969). There, the district court dismissed an action not brought to trial within five years and the dismissal was with prejudice. In affirming, we noted "although the district court might have ruled otherwise, it was within its discretion to dismiss the complaint with prejudice and we find no abuse of that discretion." Id. at 437, 456 P.2d at 855.
By appeal, the respondent could have tested the exercise of discretion by the Sixth Judicial District Court in dismissing the counterclaim without prejudice. Lindauer v. Allen, supra. It did not do so. The present action asserting the identical claim for relief is not barred.
Reversed.
ZENOFF, C.J., and BATJER and GUNDERSON, JJ., concur.
MOWBRAY, Justice (dissenting):
I dissent.
The narrow issue presented in this case is whether a writ of prohibition issued by this court ordering the Sixth Judicial District Court not to try a case 5 years after it had been filed may be circumvented by refiling the case in another district.
The respondent, Great Western Land & Cattle Corporation, commenced an action in the Sixth Judicial District Court against Appellant Constance M. Lighthouse's late husband, Noel McElhaney. Mr. McElhaney filed a counterclaim. The case was never tried within the 5-year period prescribed in NRCP 41(e).[1] After the 5-year period had run, McElhaney's counsel set the case down for trial. Upon petition to this court, a writ of prohibition was issued enjoining the Sixth Judicial District Court from going to trial. See Great W. Land & Cattle Corp. v. Sixth Judicial District Court, 86 Nev. 282, 467 P.2d 1019 (1970). The district judge thereupon dismissed Great Western's complaint with prejudice and the McElhaney counterclaim without prejudice, relying, apparently, upon the final sentence in Rule 41(e): "A dismissal under this subdivision (e) is a bar to another action upon the same claim for relief against the same defendants unless the court otherwise provides." (Emphasis added.) This sentence was added to Rule 41(e) effective March 16, 1964.
The appellant in this case, Constance M. Lighthouse, as successor in interest to her late husband, Noel McElhaney, then filed this action, which in essence was McElhaney's counterclaim, in the Second Judicial District Court. The district judge, upon motion, granted summary judgment in favor of Respondent Great Western Land & Cattle Corporation and against Appellant Lighthouse. Lighthouse has appealed, claiming that the judge of the Second Judicial *298 District erred in not permitting her to proceed, since the judge of the Sixth Judicial District had dismissed McElhaney's counterclaim without prejudice.
It is the law of this jurisdiction that dismissal is mandatory if a case has not been brought to trial within 5 years of its filing date. See Bank of Nev. v. Friedman, 86 Nev. 747, 476 P.2d 172 (1970); Faye v. Hotel Riviera, Inc., 81 Nev. 350, 403 P.2d 201 (1965).
Counsel for Appellant Lighthouse argues that the sentence added to Rule 41(e) in 1964, which provides that a dismissal under subdivision (e) is a bar unless the court otherwise provides, gave the judge of the Sixth Judicial District the power to dismiss the complaint with prejudice and the counterclaim without prejudice. Not so, in my opinion, under the posture of this case. A writ of prohibition means precisely what it says, and while it may be directed to one district judge, it becomes the law of the case. The intendment of the writ of prohibition was to terminate the litigation. To hold otherwise is eminently unfair. For instance, it means in this case that the party who initiated the litigation is out of court, while the party who was brought into the litigation is permitted to continue, and that, because Great Western's complaint was dismissed with prejudice, it has perhaps been precluded from asserting any defenses it may have to the second complaint.
I would rule, therefore, that the district judge had no discretion in this case but to follow the mandate of the writ of prohibition and terminate the litigation. The judgment of the lower court, in my opinion, should be affirmed.
NOTES
[1]  NDCP 41(e):

"The court may in its discretion dismiss any action for want of prosecution on motion of the defendant and after due notice to the plaintiff, whenever plaintiff has failed for two years after action is filed to bring such action to trial. Any action heretofore or hereafter commenced shall be dismissed by the court in which the same shall have been commenced or to which it may be transferred on motion of the defendant, after due notice to plaintiff or by the court upon its own motion, unless such action is brought to trial within five years after the plaintiff has filed his action, except where the parties have stipulated in writing that the time may be extended. When, in any action after judgment, a motion for a new trial has been made and a new trial granted, such action shall be dismissed on motion of defendant after due notice to plaintiff, or by the court of its own motion, if no appeal has been taken, unless such action is brought to trial within three years after the entry of the order granting a new trial, except when the parties have stipulated in writing that the time may be extended. When in an action after judgment, an appeal has been taken and judgment reversed with cause remanded for a new trial (or when an appeal has been taken from an order granting a new trial and such order is affirmed on appeal), the action must be dismissed by the trial court on motion of defendant after due notice to plaintiff, or of its own motion, unless brought to trial within three years from the date upon which remittitur is filed by the clerk of the trial court. A dismissal under this subdivision (e) is a bar to another action upon the same claim for relief against the same defendants unless the court otherwise provides."
