
660 P.2d 587 (1983)
99 N.M. 497
ENVIRONMENTAL IMPROVEMENT DIVISION OF the NEW MEXICO HEALTH AND ENVIRONMENT DEPARTMENT, Plaintiff-Appellant,
v.
Jack AGUAYO, David House and Flora Van Tol, Defendants-Appellees.
No. 14314.
Supreme Court of New Mexico.
March 16, 1983.
*588 Paul G. Bardacke, Atty. Gen., Joseph F. Gmuca, Asst. Atty. Gen., Santa Fe, for plaintiff-appellant.
Jack Aguayo, David House, Flora Van Tol, pro se.

OPINION
RIORDAN, Justice.
The Environmental Improvement Division of the New Mexico Health and Environment Department (EID) filed suit in district court to enjoin Jack Aguayo, David House, and Flora Van Tol (Defendants) from using a liquid waste disposal system, and to ask the district court to issue an injunction ordering Defendant Aguayo to install liquid waste systems at the homes of Defendants House and Van Tol which would not create a public nuisance. The district court granted Defendants' motion to dismiss pursuant to N.M.R.Civ.P. 12(b)(6), N.M.S.A. 1978 (Repl.Pamp. 1980). EID appeals. We reverse.
The issue on appeal is whether the district court erred in granting dismissal of EID's complaint pursuant to Rule 12(b)(6).
On July 1, 1980, EID filed its first amended complaint for injunctive relief. The allegations in the first claim of EID's complaint are that during April 1979, Defendant Aguayo installed a liquid waste system at the home of Defendant Van Tol. This liquid waste system is alleged to potentially contaminate the drinking water supply, pollute or cause high nutrient levels in a body of water, create a nuisance, and cause a hazard to public health, all in violation of New Mexico Liquid Waste Disposal Regulations (1979) (LWD Regulations). In addition, unless Defendant Van Tol is permanently enjoined from using the liquid waste system, EID will be unable to enforce the Regulations; and, as a result, EID as well as those it is charged with a duty to protect, will suffer irreparable harm, damage, and injury, for which no adequate remedy at law exists. Therefore, EID asked that Defendant Van Tol be permanently enjoined from using the system.
The second claim alleges that Defendant Van Tol's use of the liquid system constitutes knowing and unlawful conduct which results in the pollution of a body of public water and which constitutes a public nuisance in violation of Section 30-8-1, N.M.S.A. 1978. Therefore, EID asked that the district court issue an injunction ordering Defendant Van Tol to cease and desist from use of the system because it constituted a public nuisance.
The third claim alleges that during April 1979, Defendant Aguayo installed a liquid waste system at the home of Defendant House. Similar to the first claim, this liquid system is potentially contaminating and polluting in violation of the LWD Regulations, and if not enjoined, EID and those it is charged with a duty to protect will suffer irreparable harm for which no adequate remedy at law exists. Therefore, EID asked that Defendant House be permanently enjoined from using the system.
The fourth claim is similar to the second claim and alleges that Defendant House's use of the liquid waste system violates Section 30-8-1. Therefore, EID asked that the district court issue an injunction ordering Defendant House to cease and desist from use of the system because it constituted a public nuisance.
The fifth claim alleges that at the time Defendant Aguayo installed each of the liquid waste disposal systems in question, he was obliged to follow requirements of the LWD Regulations that were in effect at the time of the installations. Defendant Aguayo so installed the systems that, when operated, each system created the potential for contamination and pollution of drinking water, and caused a potential hazard to public health in violation of LWD Regulations. In addition, EID claims that unless Defendant Aguayo is ordered to install systems at the homes of Van Tol and House which conform to the LWD Regulations and do not create a public nuisance, EID is rendered unable to enforce the LWD Regulations in fulfillment of its purpose pursuant to Section 74-1-2, N.M.S.A. 1978 (Repl. Pamp. 1981); and, as a result, EID and *589 those it is charged with a duty to protect, will suffer irreparable harm for which no adequate remedy at law exists.
The sixth and final claim alleges that Defendant Aguayo's installation of both systems constitutes knowing and unlawful conduct which results in the pollution of a body of public water as defined by Section 30-8-2, N.M.S.A. 1978, and which constitutes a public nuisance in violation of Section 30-8-1.
On its fifth and sixth claims, EID asked that the district court find (1) that Defendant Aguayo's installation of the liquid disposal systems violated then existing LWD Regulations and (2) that installation of these systems created a public nuisance. Based on these findings, EID asked that the district court issue an injunction ordering Defendant Aguayo to install liquid waste systems at the homes of Defendants Van Tol and House which will not create a public nuisance and will conform with all requirements of the LWD Regulations.

Rule 12(b)(6)
A motion to dismiss pursuant to Rule 12(b)(6) merely tests the legal sufficiency of the complaint and is infrequently granted because its purpose is to test the law of the claim, not the facts that support it. McCasland v. Prather, 92 N.M. 192, 585 P.2d 336 (Ct.App. 1978); McNutt v. New Mexico State Tribune Company, 88 N.M. 162, 538 P.2d 804 (Ct.App.), cert. denied, 88 N.M. 318, 540 P.2d 248 (1975). A Rule 12(b)(6) motion is only proper when it appears that plaintiff can neither recover nor obtain relief under any state of facts provable under the claim. Runyan v. Jaramillo, 90 N.M. 629, 567 P.2d 478 (1977). Finally, if a district court grants a motion to dismiss pursuant to Rule 12(b)(6), then the allegations pleaded in the complaint must be taken as true for purposes of an appeal. Jernigan v. New Amsterdam Casualty Company, 69 N.M. 336, 367 P.2d 519 (1961); Bottijliso v. Hutchison Fruit Co., 96 N.M. 789, 635 P.2d 992 (Ct.App.), cert. denied, 97 N.M. 483, 641 P.2d 514 (1981).
In order to determine the sufficiency of EID's complaint, we must initially construe the authority from which EID brings this action. Sections 74-1-1 through 74-1-10, N.M.S.A. 1978 (Repl.Pamp. 1980 and Supp. 1982) are known as the Environmental Improvement Act (Act). Section 74-1-2 provides that:
[t]he purpose of the Environmental Improvement Act (Citation omitted.) is to create an agency which will be responsible for environmental management and consumer protection in this state in order to ensure an environment that in the greatest possible measure: will confer optimum health, safety, comfort and economic and social well-being on its inhabitants; will protect this generation as well as those yet unborn from health threats posed by the environment; and will maximize the economic and cultural benefits of a healthy people.
Sections 74-1-6(A) and (E) specifically provide that EID shall have the power to "sue and be sued", and shall have the power to "enforce the rules, regulations and orders ..." promulgated by the New Mexico Environmental Improvement Board. The Act does not prohibit or limit EID from obtaining injunctive relief. Cf. State ex rel. Norvell v. Arizona Public Service Co., 85 N.M. 165, 510 P.2d 98 (1973). EID's complaint correctly reflects this statutory authority.
After reviewing the record and taking the allegations pleaded as true, we determine that EID's complaint clearly states a claim upon which relief may be granted. EID alleges that Defendants violated applicable statutes and regulations. All elements necessary to the allegedly unlawful conduct are well-pleaded, including pleading the proper parties and the specifically defined acts. Therefore, the district court's dismissal pursuant to Rule 12(b)(6) was in error and is reversed. This case is remanded to the district court for proceedings not inconsistent with this opinion.
IT IS SO ORDERED.
FEDERICI and STOWERS, JJ., concur.
