
627 P.2d 326 (1981)
102 Idaho 147
Jerry SCOTT, dba Jerry's Welding and Construction, Inc., Plaintiff-Appellant,
v.
AGRICULTURAL PRODUCTS CORPORATION, INC., and Commercial Union Assurance Company, Inc., and David Brown, Defendants-Respondents.
No. 12898.
Supreme Court of Idaho.
April 17, 1981.
James B. Green and Ron Kerl of Green, Service, Gasser & Kerl, Pocatello, for plaintiff-appellant.
Gary L. Cooper of Racine, Huntley & Olsen, Pocatello, Roger D. Cox, Idaho Falls, for defendants-respondents.
McFADDEN, Justice.
Plaintiff-appellant Jerry Scott, doing business as Jerry's Welding and Construction, Inc., brought a declaratory judgment action against defendant-respondents Agricultural Products Corporation, Inc., Commercial Union Assurance Company, Inc., and David Brown. The district court denied plaintiff-appellant's motion for summary judgment, and upon defendants-respondents' motion, dismissed the declaratory judgment action. We affirm.
*327 In June 1974, plaintiff-appellant Jerry Scott, doing business as Jerry's Welding and Construction, Inc. (hereinafter Scott), entered into a contractual arrangement with Agricultural Products Corporation, Inc. (herinafter APC). By that agreement, Scott agreed to furnish to APC personnel to perform work at APC's plant in Conda, Idaho, the necessary supervision for that personnel, and certain items of equipment. Scott further represented that he had a working knowledge of APC's facilities and requirements, and that his personnel furnished to APC would follow all safety rules and regulations established by APC. Scott billed APC for manpower costs pursuant to a schedule set forth in the contract, and charged APC an additional fee of 28% above his manpower cost to cover the cost of taxes, insurance, and other employer-employee overhead costs.
Scott hired people and assigned them to work at APC. Scott paid those employees, referred to them in the contract as his employees, kept track of their hours, set their wages, and then retained the sole power to fire his employees or substitute others in their place.
On August 2, 1974 an APC employee instructed two Scott employees assigned to APC, Douglas Crane and Lewis Larsen, to remove a compressor from the upper level of the ball mill on the APC premises. Crane and Larsen tied a rope on the compressor and while lowering it down to the main floor the rope securing the compressor broke. As the compressor fell to the ground it struck defendant-respondent David Brown, an APC employee, severely injuring him.
On December 5, 1974, APC's surety, defendant-respondent Commercial Union Assurance Company (hereinafter Commercial Union) made written reimbursement demand upon Scott for the workmen's compensation benefits it paid and would pay to Brown, asserting that Brown was injured by Crane and Larsen while serving as employees of Scott. In response to this demand, Scott filed this action for declaratory relief (Sixth Judicial District, Caribou County, case no. 2240) alleging that Crane and Larsen were "loaned employees" under the supervision, direction and control of APC, asking the court to affirm that Crane and Larsen were loaned employees hired to APC, and that they were servants of APC at the time of Brown's injury. Scott sought this determination so as to avoid liability to Brown under the Idaho Workmen's Compensation Act and relieve Scott of any further liability to Brown for the negligence of Crane and Larsen under the doctrine of respondeat superior.
Subsequently, on February 6, 1975, Brown filed a tort action against Scott, Crane and Larsen (Sixth Judicial District, Caribou County, case no. 2243), alleging that Crane and Larsen were employees of Scott, who was an independent contractor separate and distinct from APC, and that Brown's injuries were the result of Crane and Larsen's negligence, not contributed to in any manner by APC. On March 12, 1975, Brown filed a motion to dismiss the declaratory judgment action and a week later filed a motion to consolidate the declaratory judgment action with the personal injury action. On March 25, 1975, APC and its surety, Commercial Union, also moved to dismiss on the ground that the petition for declaratory judgment failed to state a claim upon which relief could be granted.
A hearing was held on all motions and subsequently the district court entered an order staying the proceedings in the tort action, denying the motions filed by Brown, APC and Commercial Union, and denied the motion to consolidate the two actions filed by Brown. One and a half years later, on October 18, 1977, Scott filed a motion for summary judgment. APC, Brown and Commercial Union renewed their motions to dismiss the action. A hearing was held on all motions in November 1977; and on December 15, 1977, the district court entered an order denying Scott's motion for summary judgment, and granted the motion of APC for dismissal of the declaratory judgment action. The district court in refusing to grant Scott's motion for summary judgment did so on the basis that there *328 existed material issues of fact as to whether Crane and Larsen were loaned employees. The motion to dismiss the declaratory judgment action was granted in the interests of judicial economy because the same issue raised in the declaratory judgment action, i.e. whether Crane and Larsen were loaned employees, would be addressed in Brown's tort action. Scott's subsequent motion for reconsideration was denied by the district court, and this appeal was perfected.
Following the dismissal of the declaratory judgment action, the district court entered an order lifting the stay of proceeding in the tort action being brought by Brown. Thereafter, on June 23, 1980, trial was had on the tort action, resulting in a judgment in favor of Brown.
The first issue to be considered on appeal is whether the district court erred in dismissing Scott's petition for declaratory relief.
There are no Idaho decisions regarding a trial court's discretion in granting or dismissing a petition for declaratory relief where there is a pending action involving the same issue(s), and the request is otherwise appropriate. However, since Rule 57 of the Idaho Rules of Civil Procedure, which sets forth the procedures for obtaining declaratory relief, is virtually identical to Rule 57 of the Federal Rules of Civil Procedure, federal case law is of assistance in determining whether the trial court's dismissal here amounted to error.
Several federal courts have held that where another suit is pending it is proper for a court to refuse to entertain a request for declaratory relief, or alternatively stay the request until the pending action is adjudicated, if the pending action involves identically the same issues as those raised by the declaratory judgment action. See Bergh v. State of Washington, 535 F.2d 505 (9th Cir.1976) cert. den., 429 U.S. 921, 97 S.Ct. 318, 50 L.Ed.2d 288; National Health Federation v. Weinberger, 518 F.2d 711 (7th Cir.1975); American Home Assurance Co. v. Insular Underwriters Corp., 494 F.2d 317 (1st Cir.1974); PPG Industries, Inc. v. Continental Oil Co., 478 F.2d 674 (5th Cir.1973); Fay v. Fitzgerald, 478 F.2d 181 (2d Cir.1973). The rationale advanced is that because of convenience, efficiency and expediency, it is necessary to insist that the parties to the declaratory judgment action assert their claim in the pending action so as to avoid the evils inherent in a multiplicity of actions. Id. The rule is subject to one important caveat: the pending action must necessarily settle those issues raised in the declaratory judgment action. Thoms v. Heffernan, 473 F.2d 478 (2d Cir.1973), vacated, 418 U.S. 908, 94 S.Ct. 3199, 41 L.Ed.2d 1154 (1974); Chicago Freight Car Leasing Co. v. Martin Marietta Corp., 66 F.R.D. 400 (N.D.Ill. 1975).
This court's decision in the analogous case of Roberts v. Hollandsworth, 101 Idaho 522, 616 P.2d 1058 (1980), is consistent with federal authority, supra. There, the district court dismissed the plaintiff's state court action pursuant to a motion under I.R.C.P. 12(b)(8) on the ground that there was another action pending in the federal courts between the same parties for the same cause of action. In affirming the dismissal, the court held:
"There is no suggestion in the record that the federal district court did not have jurisdiction to resolve the entire conflict between the parties, and the plaintiffs have not asserted that the federal court lacked jurisdiction to resolve the issues on the merits. The filing of the second action in the state court under these circumstances, involving as it did the same parties, the same issues and the same facts, incurs needless and substantially increased costs to the defendants, is a waste of judicial resources, and conjures up the possibility of conflicting judgments by state and federal courts. (footnote omitted). While there may be some circumstances which would justify a state court in staying a state court action pending the termination of a similar controversy pending the federal courts, under the circumstances of this case we conclude that the trial court did not err in dismissing this action." (Citations omitted.) 101 Idaho at 525, 616 P.2d at 1061.
*329 Thus, where the issues in the pending action are the same between the parties then the effect to be given that action as regards another action between the parties is governed by practical considerations of efficiency and expediency. Applying these considerations here, although it may have been proper under the circumstances for the district court to have stayed the proceedings in the pending tort action until declaratory relief was entered in Scott's action, no error is to be found in the district court's decision to dismiss the petition for declaratory relief on the basis of judicial economy.
Scott concedes in its brief that the tort action would dispose of the loaned employee issue as between himself and Brown. However, Scott places great emphasis on the fact that since APC and its surety, Commercial Union, were not parties to the pending tort action, that action would not necessarily settle the loaned employee issue between them as raised in the petition for declaratory relief. The essence of this concern is that if Brown obtained a judgment against Scott, and collected it, Scott would nevertheless be left unprotected from further suits on that particular claim by APC and Commercial Union. Such a concern is unwarranted. By statute, the employer of Brown, APC and its surety, Commercial Union, are subrogated parties in Brown's tort action against Scott. I.C. § 72-223(3). This being the case, it is clear that Scott will be fully protected from any further suits brought by APC and Commercial Union. Thus, the fact that a full hearing of the loaned employee issue would occur in the pending tort action between Brown and Scott, and that the interests of Scott are fully protected from any further suits brought by APC and Commercial Union to recover their subrogated interests, in conjunction with the concern for judicial economy and a desire to avoid a multiplicity of suits lead to the conclusion that the district court's dismissal of the declaratory judgment action was a proper exercise of its discretionary power in such matters.
The conclusion reached today is not lessened by the fact that the petition for declaratory relief was filed prior to the filing of the tort action. There does exist authority for the proposition advanced by Scott that where the commencement of the declaratory judgment action precedes the request for traditional relief, the motion to dismiss the declaratory judgment action should be denied. See Brooks Transp. Co. v. McCutcheon, 154 F.2d 841 (D.C.App. 1946); E.W. Bliss Co. v. Cold Metal Process Co., 102 F.2d 105 (6th Cir.1939). Cf. E.F. Hutton & Co. v. Cook, 292 F. Supp. 409 (S.D.Tex. 1968). However, there exists an equally strong line of authority which rejects the application of such a categorical rule. Produce Eng. & Mfg. Inc. v. Barnes, 424 F.2d 42 (10th Cir.1970); New York Central R.R. Co. v. Colonial Stores, Inc., 332 F. Supp. 531 (S.D.Ohio 1971); Rexco Industries, Inc. v. Commercial Ins. Co. of Newark, N.J., 326 F. Supp. 958 (D.P.R. 1971). The latter line of authority appears to be the better view, and the court is in agreement with Moore's observation in his treatise on Federal Practice that:
"The efficacy of the declaratory remedy would be subverted by a strict adherence to any such ironclad dogma. Since admittedly discretion rather than jurisdiction is at issue, the effect to be ascribed to the pendency of another action should be determined by broad principles of convenience, expediency and efficiency  and not by the enunciation of rules of thumb." Moore's Federal Practice, Vol. 6A ¶ 57.08 (2d ed. 1974).
See also Ennis v. Casey, 72 Idaho 181, 238 P.2d 435 (1951), cited in Farm Bureau Mut. Ins. Co. of Idaho v. Hmelevsky, 97 Idaho 46, 539 P.2d 598 (1975) (Bakes, J., dissenting).
Although the district court's dismissal was a proper exercise of its discretionary power in such matters, the dismissal itself must be modified. Rules 41(b) of the Idaho Rules of Civil Procedure provides in pertinent part that
"Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision and any dismissal not *330 provided for in this rule, other than a dismissal for lack of jurisdiction, for improper venue, or for failure to join a party under Rule 19, operates as an adjudication upon the merits."
Thus, a dismissal under Rule 41(b) is in the phrase commonly used by the courts, "with prejudice." The significance of this is that a dismissal with prejudice will bar a subsequent action involving the same claim between the parties or their privies. Costello v. United States, 365 U.S. 265, 81 S.Ct. 534, 5 L.Ed.2d 551 (1961). See also Bauscher Grain v. Nat'l Sur. Corp., 92 Idaho 229, 440 P.2d 349 (1968); National Ro-Tile Corp. v. Loomis, 82 Idaho, 65, 350 P.2d 217 (1960).
The order dismissing the declaratory judgment action failed to specify whether the dismissal was with or without prejudice. Technically then, under Rule 41(b), the dismissal is with prejudice, operates as an adjudication on the merits, and would bar subsequent actions between the parties on the claim involved. However, since the case was dismissed because the district court concluded there was another action pending, which required that the issue of loaned employees be tried in that action, certainly it cannot be said to have been dismissed with prejudice, given that the district court intended the issue to be litigated in the pending action. Miller v. Johnson, 370 P.2d 171 (Alaska 1963). Accordingly, the order dismissing the declaratory judgment action must be without prejudice, and is so modified.
Given the court's conclusion that the district court properly dismissed the declaratory judgment action, there is no need to discuss the last issue presented on appeal: whether the district court erred in denying Scott's motion for summary judgment in that action.
Judgment of dismissal modified and affirmed. Costs to respondents.
BAKES, C.J., and BISTLINE and DONALDSON, JJ., concur.
SHEPARD, J., dissents, without opinion.
