
206 N.W.2d 12 (1973)
STATE BOARD OF MEDICAL EXAMINERS, Appellant,
v.
Richard E. OLSON, Respondent,
v.
MINNESOTA STATE BOARD OF CHIROPRATIC EXAMINERS, Intervenor, Respondent,
Minnesota State Medical Association, Intervenor, Appellant.
Nos. 43618, 43621.
Supreme Court of Minnesota.
March 2, 1973.
Rehearing Denied April 2, 1973.
*13 Warren Spannaus, Atty. Gen., Milton H. Altman, Sydney Berde, St. Paul, for St. Bd. of Med. Ex.
Dorsey, Marquart, Windhorst, West & Halladay and Curtis L. Roy and William J. *14 Keppel, Minneapolis, for Minn. St. Med. Assoc.
Clinton J. Hall, St. Paul, Gordon Rosenmeier, Little Falls, for Richard E. Olson.
Richard W. Johnson and Richard J. Keenan, Minneapolis, for Minn. St. Bd. of Chiropractic Examiners.
Heard and considered en banc.
KNUTSON, Chief Justice.
This case was commenced originally by State Board of Medical Examiners (Medical Board) against Robert E. Olsen,[1] a licensed chiropractor, seeking a declaratory judgment under Minn.St. c. 555 that the use by defendant of certain devices constitutes the practice of medicine and that their use by a chiropractor is not permitted.[2] For the sake of brevity the devices may be designated as (1) an Aloesine device; (2) a Magason VI device; (3) a Dallans device; and (4) a Liebel-Flarsheim device. Plaintiff also sought injunctive relief enjoining the use of such devices by a chiropractor.
The functions of these devices may be briefly stated as follows: The Aloesine device is a muscle stimulator which uses low-voltage current; the Magason VI is an ultrasonic device used for therapeutic purposes; the Dallans device is an electronic muscle stimulator which can be used in conjunction with the Magason VI; and the Liebel-Flarsheim is a short-wave diathermy device used for therapeutic purposes.
Defendant Olsen answered plaintiff's complaint, admitting possession of these devices and claiming the right to use the four devices described above.
The State Board of Chiropractic Examiners (Chiropractic Board) and the Minnesota State Medical Association were permitted to intervene in the case. The Chiropractic Board interposed an answer in support of Olsen, claiming that "[a] duly licensed chiropractor in Minnesota has the right under the laws of this State to use in his chiropractic practice" the four devices described above. The Minnesota State Medical Association joined with plaintiff essentially in the claims found in the complaint.
After much legal maneuvering and many motions, the case was finally called for trial on January 21, 1969. At that time defendant was permitted to amend his answer and, in addition to the allegations of the original answer, to allege that plaintiff has not exhausted its administrative remedies, "because if there is merit to its complaint exclusive jurisdiction lies in the Board of Chiropractic Examiners." Defendant also asserts that plaintiff does not have standing to bring this action.
Thereafter followed a lengthy colloquy between the court and counsel as to how the case should be submitted. This essentially constitutes the record as far as the issues on this appeal are involved. Defendant finally moved for dismissal on the ground of lack of jurisdiction. Plaintiff moved for summary judgment, and with respect thereto the following discussion appears:
"MR. BERDE. There was on plaintiff's part a motion for summary judgment on the grounds that there is no genuine issue of fact and that plaintiff is entitled to judgment as a matter of law, said motion to be made, and it is made, upon all the files, records and proceedings herein, including in addition the deposition, the trial deposition of Dr. Frederick Kottke which plaintiff intends to take.

* * * * * *
"THE COURT. No, that motion may well be denied.

*15 "MR. ROSENMEIER. Yes, because there are questions of fact, the depositions may show there are.
"THE COURT. Yes.
"MR. BERDE. Yes, if there are questions of fact I assume the court will decide this is not a case for summary judgment and not even reach the question whether we are entitled to judgment as a matter of law.
"THE COURT. My understanding is, my intention is, that I am going to, after receiving all the materials and arguments and briefs and so on, I am going to consider the motions one at a time, the motions are all denied, and then I am going to consider the case as submitted. And what, thirty days for these depositions?
"MR. BERDE. For the depositions, plus submitting?[3]
* * * * * *
"THE COURT. Back on the record. The previous order of the court is amended in this regard, that the first item to be considered by the court will be the motion of the defendant's attorney, Mr. Bonner, for dismissal on the basic ground of lack of jurisdiction. * * *
* * * * * *
"MR. ROSENMEIER. Has that all been agreed, does everybody understand what he is doing with us now? I don't know that I do. You are giving up your right to trial, you are giving up your right to admissibility of evidence?
"MR. BERDE. No.
"THE COURT. No, I don't feel that everyone is giving up their right to trial, Mr. Rosenmeier. They are agreeing, as I understand it the parties have agreed to try the case in this manner. There is a trial except we are not going to have witnesses on the stand. We are going to have depositions and other evidence introduced, at least some exhibits, and it is a trial." (Italics supplied.)
Apparently, that is the way the case remained until May 3, 1971, when the court made findings of fact, conclusions of law, and order for judgment. As conclusions of law, the court determined:
"1. The complaint does not state a claim upon which relief can be granted, nor does the evidence show ground for the relief sought.
"2. State Board of Medical Examiners does not have standing as plaintiff in this action.
"3. Plaintiff has not pursued its available, adequate, appropriate, alternative remedies.
"4. The requirements of Minn.St. 15.0416 for declaratory judgment are not present.
"5. Defendant is entitled to judgment of dismissal on the merits."
After denial of post-trial motions, plaintiff and intervenor Minnesota State Medical Association appealed from the judgment.
The case is collateral to an action brought by the United States. On April 13, 1966, an action was commenced in the Federal court by the United States as libellant to seize the devices described in the complaint which were in the possession of Olsen on the ground that the devices were misbranded within the meaning of § 502(f) of the Federal Food, Drug, and Cosmetic Act, 21 USCA § 352(f). There, as here, Olsen filed an answer admitting the possession of these devices but alleging that he was lawfully using them. On September 20, 1968, the Chiropractic Board moved for leave to intervene in the libel proceeding. Thereafter the board filed an answer of intervention. They again admitted possession of the devices by Olsen and *16 claimed that a duly licensed chiropractor has the right to use them in his practice.
Upon learning of the intervention of the Chiropractic Board in the Federal action, the Medical Board sought the assistance of the attorney general. It was thereafter agreed that the Federal court would retain jurisdiction in its libel action pending a determination in an action by the Medical Board in a state court of the legality of the use of these devices by chiropractors under Minnesota law. The Federal action is apparently still pending, awaiting a determination here of the issue which the trial court has failed to decide.
Reading the record before us can lead to only one conclusion, and that is that everyone was confused as to the proper disposition of the case. In pretrial discovery proceedings, the trial court entered a pretrial order on November 20, 1969, upon the stipulation and agreement of the parties that one of the issues in the case is "whether it is legal for a chiropractor to use such devices." Thus, at the very outset the trial court stated as one of the issues for determination this core issue which it later failed to decide. It seems clear that what started out to be a motion for dismissal for lack of jurisdiction under Rule 12 of Rules of Civil Procedure ended up as a Rule 41.02(2) dismissal of the action with prejudice, without any decision on the core issue. The case could not be disposed of on the merits in this manner under Rule 41.02(2) unless plaintiff had submitted it to the court for decision. This seems to be conceded by everyone. In the brief of defendant Olsen we find quoted the following summary by the court:
"* * * [B]ut other than these things that are basically matters of law, is everyone agreed then that Dr. Kottke will be deposed on appropriate notice, and that Mr. Johnson will depose him, impeaching Fitzgerald, or attempting to, on appropriate notice, and that certain records of the State Board of Chiropractic will be submitted as exhibits, copies furnished to all parties, if there is any objection to those at that time that can be made to the court in writing. * * *
"I am trying to get the thing submitted." (Italics supplied.)
It seems clear that everyone in court up to this point considered defendant's motion one to dismiss under Rule 12, and, if that was denied, the plaintiff would be permitted to depose Dr. Kottke and other exhibits would be introduced as part of their case. When the case was dismissed under Rule 41.02(2), plaintiff had no opportunity to complete its evidence; and the case could not be dismissed on the merits under that rule until the case was completed.[4]
Olsen's brief also claims that a report of the Department of Health, Education, and Welfare[5] was not evidentiary and therefore would not support a finding of potential injury. He states:
"* * * This report got into the file as part of a brief and is not evidentiary. Judicial notice of its existence may be permissible but not of the probative effect of its recommendations.
"The concept that use of the device by defendant is a public nuisance per se, or *17 by itself shows injury or potential injury to the public health or welfare, is equally unsupported."
There is in the file an affidavit of Dr. Kottke which, if taken as true, would be convincing evidence that the use of the devices involved constituted the practice of medicine. If this affidavit is not considered as evidence, there is all the greater reason why plaintiff should have been permitted to depose Dr. Kottke.
Taking the conclusions of the trial court in order, therefore, it seems clear that the complaint does state facts which, if proved, would entitle plaintiff to a declaratory judgment that the use of the devices involved constitutes the practice of medicine.
1. The contention that this is not a proper case for a declaratory judgment is untenable. Minn.St. 555.02, in relevant part, provides:
"Any person interested under a deed, will, written contract or other writings constituting a contract, or whose rights, status, or other legal relations are affected by a statute, municipal ordinance, contract or franchise may have determined any question of construction or validity arising under the * * * statute * * * and obtain a declaration of rights, status, or other legal relations thereunder."
Clearly, under this statute the Medical Board has sufficient interest to seek a declaration as to whether the use of the devices involved constitutes the practice of medicine.
2. With respect to the finding that the Medical Board does not have standing as plaintiff in this action, it would seem that Minn.St. 147.01 gives the board power to bring an action to have determined by the court whether a person not licensed to practice medicine is actually engaged in such practice.
3-4. The main thrust of respondents' briefs is that the Medical Board has not exhausted its administrative remedies and that therefore this action in court will not lie. The doctrine of exhaustion of administrative remedies does have some limitations. Where it would be futile to seek redress from an administrative body, the courts are available to a party to seek redress. Thomas v. Ramberg, 240 Minn. 1, 60 N.W.2d 18 (1953). Here, it would obviously have been fruitless to proceed before the Chiropractic Board. That is evident from the answer interposed in this action, where the board as well as Olsen admit possession and use of the devices involved but claim a chiropractor has a right to use them in his practice. The same would be true of proceeding before the Medical Board. It has brought this action, claiming that the use of the devices is a practice of medicine. Both boards have unequivocally committed themselves, and it is hard for us to understand how anyone could expect any other decision had the matter been presented to either board. While Minn.St. §§ 148.01 to 148.101 in a proper case confer on the Chiropractic Board power to regulate the chiropractic practice, under the facts in this case it would be useless to ask it to determine whether the actions of a chiropractor constitute the practice of medicine. It seems to us that that determination under these circumstances should be made by a court.
5. Finally, the dismissal on the merits under Rule 41.02(2) was improper, as we have stated above, because the case was never finally submitted. In the case of Gittleman v. Fesenmaier, 268 Minn. 238, 240, 128 N.W.2d 709, 710 (1964), we said:
"* * * [U]nder Rule 41.02(2), Rules of Civil Procedure, the court is authorized to grant a dismissal only after plaintiff has completed the presentation of his case. Hence, it was error to grant the motion before the plaintiff had rested."
Plaintiff undoubtedly was waiting for the court's decision on the motion to dismiss for lack of jurisdiction under Rule 12 *18 and, not having received a decision on that issue, did not proceed to introduce additional evidence. The court justifies proceeding when it did on the theory that after the long delay it could be assumed that plaintiff did not intend to introduce any more evidence. But plaintiff had a right to wait until the motion for dismissal for lack of jurisdiction was decided before it proceeded to complete its case.
6. The only motion made by defendant for dismissal was upon the ground that the court lacked jurisdiction. If the court lacks jurisdiction over the subject matter, it never reaches the merits of the case. A motion for dismissal under Rule 12 for lack of jurisdiction must be decided before the court proceeds with the trial. Here the court takes the inconsistent positions that it lacks jurisdiction and that the case has been submitted to it for determination on the merits. In Sanderson v. Postal Life & Cas. Ins. Co., 2 F.R.D. 203, 204 (W.D., Mo.1941), we find the following:
"It would seem to me obvious that if the case is dismissed because the court has no jurisdiction, certainly it cannot be dismissed with prejudice, since that involves the exercise of jurisdiction."
In Bell v. Hood, 327 U.S. 678, 682, 66 S.Ct. 773, 776, 90 L.Ed. 939, 943 (1946), the Supreme Court of the United States said:
"* * * [I]t is well settled that the failure to state a proper cause of action calls for a judgment on the merits and not for a dismissal for want of jurisdiction. Whether the complaint states a cause of action on which relief could be granted is a question of law and just as issues of fact it must be decided after and not before the court has assumed jurisdiction over the controversy."
7. A dismissal for failure to exhaust its administrative remedies is also inconsistent with a dismissal on the merits under Rule 41.02(2). The case of Durham v. Mason and Dixon Lines, Inc., 404 F.2d 864 (6 Cir. 1968), involved a motion to dismiss an action alleging that the complaint failed to state a claim upon which relief could be granted and that appellants had failed to exhaust grievance procedures provided in their collective bargaining agreement. The court said (404 F.2d 865):
"* * * The sustaining of a motion to dismiss for failure to state a claim upon which relief can be granted is a judgment on the merits. See 2A J. Moore, Federal Practice ¶ 12.09, at 2313 (2d ed. 1968). On the other hand, sustaining a motion to dismiss for failure to exhaust the grievance procedure provided in a collective bargaining agreement results only in a dismissal of the action without prejudice. See 6 J. Moore, Federal Practice ¶ 56.03, at 2052 (2d ed. 1966)."
While the court here apparently intended to decide the case on the merits after a trial, such as it was, its position in also dismissing the case on the merits for failure to exhaust administrative remedies is wholly inconsistent with that intention.
8. One further question remains, and that is whether plaintiff is entitled to injunctive relief. Apparently the trial court was of the opinion that, inasmuch as practicing medicine without a license constitutes a crime, defendant Olsen could be prosecuted as a criminal if he engaged in the practice of medicine without a license. It is true that courts ordinarily will not grant injunctive relief if there is another adequate remedy, but the mere fact that an act constitutes a crime does not prevent injunctive relief. In Fitchette v. Taylor, 191 Minn. 582, 584, 254 N.W. 910, 911, 94 A. L.R. 356, 358 (1934), we said:
"* * * Ordinarily, injunction does not lie merely to prevent commission of crime. But the criminality of an act or series of them does not bar injunctive relief if otherwise there is ground for it." *19 See, also, State v. Red Owl Stores, Inc., 253 Minn. 236, 92 N.W.2d 103 (1958); Gardner v. Conway, 234 Minn. 468, 48 N. W.2d 788 (1951); State ex rel. Goff v. O'Neil, 205 Minn. 366, 286 N.W. 316 (1939). In addition to what we have said in these cases, Minn.St. 147.01 expressly confers on the Medical Board in the following language the right to seek injunctive relief under some circumstances:
"* * * In the administration of this chapter the board shall have the power to compel the attendance of witnesses and the production of documents by subpoena, to investigate complaints of violations of this chapter or the rules and regulations of the board, and to institute injunctive proceedings to restrain violations upon a showing of injury or potential injury to the public health or welfare."
Whether injunctive relief should be granted depends on facts that must be determined by the trial court. If the court should finally determine on the core issue that defendant Olsen was practicing medicine, it is probable that injunction would be the only way to require him to discontinue this practice.
We have limited our discussion to the actions of Olsen. The case does involve more; it seeks injunctive relief against all chiropractors. However, we assume that, if the court should finally decide that the use of the devices involved constitutes the practice of medicine and that it is not permissible for a chiropractor to use them, the Chiropractic Board would then enforce that decision against its members.
In order that there be a final determination of the real issue involved, the case is remanded to the trial court with instructions to reopen the case to permit any of the parties to introduce such further evidence as they deem pertinent. The trial court should then determine the issue as to whether the use of these devices does constitute the practice of medicine or whether their use is within the permissible activities of a chiropractor as established by our law.
Remanded with instructions.
NOTES
[1]  The name of defendant was mistakenly shown on the pleadings as Richard E. Olson.
[2]  The case apparently was started as a class action, but due to plaintiff's failure to accomplish that objective, we treat it as if brought against Olsen individually.
[3]  Much of the ensuing discussion was "off the record."
[4]  Rule 41.02(2), Rules of Civil Procedure, reads: "After the plaintiff has completed the presentation of his evidence, the defendant, without waiving his right to offer evidence in the event the motion is not granted, may move for a dismissal on the ground that upon the facts and the law the plaintiff has shown no right to relief. In an action tried by the court without a jury the court as trier of the facts may then determine them and render judgment against the plaintiff or may decline to render any judgment until the close of all the evidence. If the court renders judgment on the merits against the plaintiff, the court shall make findings as provided in Rule 52.01."
[5]  Department of Health, Education & Welfare, Independent Practitioners Under Medicare: A Report to the Congress (1968).
