
783 P.2d 955 (1989)
UNITED ASSOCIATION OF JOURNEYMEN AND APPRENTICES OF the PLUMBING AND PIPE FITTING INDUSTRY, Appellants,
v.
Dorothy Jean MANSON, Gary L. Manson, and Gregg W. Manson, Respondents.
No. 19623.
Supreme Court of Nevada.
December 6, 1989.
Langton & Kilburn, Reno, for appellants.
James C. Van Winkle, Reno, for respondent Dorothy Jean Manson.
Hamilton & Lynch, Reno, for respondents Gary L. Manson and Gregg W. Manson.

OPINION
PER CURIAM:
NRCP 41(e) mandates dismissal of an action that has not been brought to trial within five years of the filing of the plaintiff's *956 complaint.[1] In this case, the district court correctly held that the submission of a motion for summary judgment which is subsequently granted constitutes bringing an action to trial. The district court also correctly held that dismissal of a third-party claim becomes mandatory when the claim has not been brought to trial within five years of the time the original plaintiff commenced the action. The district court, however, erred in believing that NRCP 41(e) mandates dismissal with prejudice. We modify the dismissal with prejudice to a dismissal without prejudice and affirm the district court's orders in all other respects.

Facts and Procedural History
Gerald Manson and respondent Dorothy Manson were divorced on January 11, 1983. Respondents Gary and Gregg Manson were the sons of Gerald Manson but were not related to Dorothy Manson after their father divorced her in 1983. Gerald Manson died on March 5, 1983. At the time of his death, his designated beneficiary was entitled to death benefits of $3,000 from a fund managed by appellant United Association of Journeymen and Apprentices of the Plumbing and Pipe Fitting Industry, Local 350 (Local 350).
On February 24, 1983, while in St. Mary's Hospital in Reno, Gerald executed a power of attorney to his son Gary. And on March 4, 1983, Gary executed a death benefit beneficiary designation card naming his brother Gregg as the beneficiary of Gerald's death benefits in the place of Dorothy Manson and delivered it to Local 350. Gary had executed this card under the power of attorney.
On March 5, 1983, Gerald died. Gregg then assigned the proceeds of the death benefit to a funeral home for his father's funeral. Local 350 paid approximately $2,100 to the funeral home and paid the remaining $900 to Gregg.
Dorothy Manson filed a complaint against Local 350 on April 14, 1983, claiming that the death benefits should have been paid to her because the death beneficiary designation card executed by Gary Manson was invalid. Local 350 answered the complaint and later filed a third-party complaint against Gary and Gregg Manson on August 3, 1983, to recover any amount that Dorothy Manson might obtain from Local 350.
Dorothy Manson filed a motion for summary judgment on October 17, 1986, but the court denied that motion. On January 20, 1988, Dorothy Manson again filed a motion for summary judgment. The district court granted this motion in favor of Dorothy Manson on June 10, 1988. Before the district court entered this order, however, five years had passed since Dorothy Manson had filed her complaint.
On June 22, 1988, the court scheduled a trial on Local 350's third-party claim against Gary and Gregg Manson for July 15, 1988. But on July 14, 1988, Gary and Gregg Manson moved that the third-party claim be dismissed because it had not come to trial within five years of the filing of the original complaint in the action. The next day, Local 350 was ready to go to trial, but the court dismissed the third-party claim because it had not been brought to trial within five years of the filing of Dorothy Manson's complaint, even though five years had not elapsed since Local 350 had filed its third-party complaint against Gary and Gregg Manson.

Denial of Local 350's Motion to Dismiss Dorothy Manson's Claim
Local 350 first contends that Dorothy Manson did not bring her action to trial within five years as required by NRCP 41(e) and that the court should have dismissed the case rather than granting Dorothy Manson's motion for summary judgment. As can be seen from the procedural history in this case, Dorothy Manson *957 brought two motions for summary judgment against Local 350 before the five years expired. The first motion was denied. The second motion was granted after the five years had expired, even though the motion had been submitted before the five years had expired.
The California courts have dealt with the question of whether a motion for summary judgment amounts to bringing the case to trial, and they have hinged their answer on whether the motion was granted.[2] In no instance have those courts found that the filing of a motion for summary judgment that was eventually denied constituted bringing the case to trial. See, e.g., Bella Vista Dev. Co. v. Superior Court, 223 Cal. App.2d 603, 36 Cal. Rptr. 106, 112 (1963) (holding that denial of motion for summary judgment merely a determination that there remain issues of triable fact and, therefore, not a trial). Thus, a motion for summary judgment, without more, is insufficient to constitute bringing the case to trial. However, the California courts have unanimously held that, when a motion for summary judgment has been granted, the case has been brought to trial. Bella Vista, above; Southern Pac. Co. v. Seaboard Mills, 207 Cal. App.2d 97, 24 Cal. Rptr. 236 (1962); see also Berri v. Superior Court, 43 Cal.2d 856, 279 P.2d 8 (1955) (ruling that court's sustaining of demurrer to complaint without leave to amend constituted bringing the case to trial). These courts have come to this conclusion by defining a trial as "the examination before a competent tribunal, according to the law of the land, of questions of fact or of law put in issue by pleadings, for the purpose of determining the rights of the parties." Bella Vista, above, 36 Cal. Rptr. at 109, quoting Adams v. Superior Court, 52 Cal.2d 867, 345 P.2d 466, 469 (1959). Since the denial of a motion for summary judgment merely involves a finding that there remain triable issues of fact, it is not a trial. On the other hand, the granting of a motion for summary judgment involves first finding that no triable issues of fact remain and then determining the rights of the parties by applying the law to the facts. Bella Vista, above, 36 Cal. Rptr. at 109.
In this case, Dorothy Manson moved for summary judgment, and that motion was submitted to the court before the five years had expired. Since the court ruled in her favor, the submission of the motion for summary judgment before the expiration of the five-year period for bringing the case to trial constituted bringing the case to trial. The court properly denied Local 350's subsequent motion to dismiss for failure to bring the case to trial within five years.

Dismissal of Local 350's Third-Party Claim
This issue again deals with NRCP 41(e) which mandates dismissal if a case is not brought to trial within five years. Local 350 did not attempt to bring its third-party claim against Gary and Gregg Manson to trial until after five years had passed from the time Dorothy Manson, the original plaintiff, had filed her complaint. Upon Gary and Gregg Manson's motion, the court dismissed the case. Local 350 now contends that it should have had five years to bring the case to trial from the time it filed its third-party complaint against Gary and Gregg Manson, rather than from the time Dorothy Manson filed her complaint.
NRCP 41(e) gives five years for trial of an "action", not of a "claim." Unlike a claim, an action includes the original claim and any crossclaims, counterclaims, and third-party claims. In fact, NRCP 41(c) specifically states that the rule applies to crossclaims, counterclaims, and third-party claims. NRCP 2 states that "[t]here shall be one form of action to be known as `civil action'." NRCP 3 states that "[a] civil action is commenced by filing a complaint with the court." NRCP 14(a) then provides for a third-party claim, stating that a defending party, "[a]t any time after the commencement of the action, ... may *958 cause a summons and complaint to be served upon a person not a party to the action. ..." (Our emphasis.) Thus, the original claim and any crossclaims, counterclaims and third-party claims are all part of one "action." Under the language of NRCP 41(e), the action commences when the plaintiff files a complaint, and the five-year period for bringing the action to trial begins to run.
This action commenced on April 14, 1983, when Dorothy Manson filed her complaint. The five years for bringing the action to trial expired on April 14, 1988, and Local 350 had not brought the action to trial. Therefore, the district court was correct that dismissal was mandatory under NRCP 41(e). However, the court in its order stated that the expiration of five years "makes dismissal with prejudice mandatory... ." This is an incorrect statement of the law and reveals the court's basic misunderstanding of NRCP 41(e). The last sentence of NRCP 41(e) states that "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." The district court had no choice but to dismiss the action, but when justice so requires the court may dismiss the action without prejudice. See Schramm v. El-Khatib, 82 Nev. 22, 409 P.2d 888 (1966). The district court's misapprehension of NRCP 41(e) and the failure to exercise the discretion given by the rule were plain error. See Bradley v. Romeo, 102 Nev. 103, 716 P.2d 227 (1986).
Local 350's claim against Gary and Gregg Manson did not ripen until the court granted summary judgment for Dorothy Manson on June 10, 1988. On that date, however, the five years for bringing the action to trial had already expired. Under NRCP 41(e), Local 350 had to bring its third-party claim to trial before it ripened. Accordingly, justice would require that the district court exercise its discretion by dismissing Local 350's third-party claim without prejudice.
We have considered all of Local 350's contentions on appeal, and we hold that the district court erred only in dismissing Local 350's third-party claim with prejudice. We therefore modify the order of the district court to state that the third-party claim is dismissed "without prejudice," instead of "with prejudice." And with that modification, we affirm.
NOTES
[1]  NRCP 41(e) provides, in pertinent part, as follows:

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 any party, or on the court's own motion, after due notice to the parties, unless such action is brought to trial within five years after the plaintiff has filed his action.
[2]  NRCP 41(e), mandating dismissal of an action not brought to trial within five years, is virtually the same as the former 1943 NCL § 9932 which was adopted from California Code of Civil Procedure § 583 in 1943. See Harris v. Harris, 65 Nev. 342, 346, 196 P.2d 402, 404 (1948).
