
548 P.2d 155 (1976)
STATE of Montana ex rel. DEPARTMENT OF HEALTH AND ENVIRONMENTAL SCIENCES, Plaintiff and Appellant,
v.
CITY OF LIVINGSTON, COUNTY OF PARK, State of Montana, Defendant and Respondent.
No. 13125.
Supreme Court of Montana.
Submitted February 2, 1976.
Decided April 1, 1976.
Richard D. Klinger (argued), A. Michael Salvagni, Helena, for plaintiff and appellant.
Robert L. Jovick (argued), Livingston, for defendant and respondent.
HASWELL, Justice.
The State of Montana filed a civil action against the City of Livingston in the district court, Park County, seeking recovery of a monetary penalty and a compliance order from the court for alleged violations of Montana's Water Pollution Act, Title 69, Chapter 48, R.C.M. 1947. The City moved to dismiss the complaint for failure to state a claim. The district court granted summary judgment in favor of the City. The State appeals.
According to the complaint, the State Department of Health and Environmental Sciences (Department) issued the City a permit on November 21, 1973, which authorized a limited discharge of liquid wastes from the City's sewage treatment plant into the Yellowstone River. "Special conditions" of the permit required the City to immediately notify the Department and *156 the federal Environmental Protection Agency (EPA) of any accidental or unplanned discharge or diversion of wastes which would tend to violate the conditions of the permit.
The complaint further alleges that on or about September 6, 1974, representatives of the Department and the EPA observed a bypass of raw sewage from the City's sewage treatment plant into the Yellowstone River. The City did not notify the Department or the EPA as required by its permit.
The complaint states the Department issued a compliance order which it served on the city clerk of Livingston. The compliance order was issued pursuant to section 69-4820.1(2), R.C.M. 1947, and ordered the City to submit to the Department within fifteen days an eight-point report relating to the cause of the bypass and the corrective and preventive measures taken by the City. The City failed to respond to the compliance order.
The complaint asserted two violations of Montana's Water Pollution Act by the City: (1) failure to immediately notify the Department and the EPA of the sewage bypass in violation of section 69-4806(3), R.C.M. 1947, and (2) failure to reply to the Department's compliance order in violation of section 69-4820.1(2), R.C.M. 1947. The complaint seeks a civil penalty of $3,000 and a court order directing the City to maintain full compliance with all terms and conditions of its permit.
The City filed a motion to dismiss the complaint for failure to state a claim on which relief can be granted. The motion was submitted for decision on briefs. The district court entered an order stating in pertinent part:
"* * * it appearing to the Court that the Complaint fails to state a claim upon which relief can be granted and that there is no genuine issue as to any material fact;
"IT IS HEREBY ORDERED that Judgment be entered in favor of Defendant, City of Livingston * * *."
The State appeals.
The ultimate issue on appeal is whether summary judgment was properly granted. This turns on two underlying questions: (1) Does the complaint state a claim on which relief can be granted? (2) Can summary judgment be granted on a motion to dismiss the complaint for failure to state a claim?
In its first claim for relief, the State alleges that agents of the Department and the EPA observed the bypass of raw sewage from the City's sewage treatment plant into the Yellowstone River and that the City did not "immediately notify" the Department and the EPA of such bypass as required by its permit. Assuming that these allegations are true, is the State entitled to relief? We think not, and so hold. The Department had actual notice of the bypass. Telephone or written notice by the City under these circumstances would have been a useless gesture. Section 49-124, R.C.M. 1947, states:
"The law neither does nor requires idle acts."
No claim for relief on this basis is stated.
In its second claim for relief, the State alleges issuance of an appropriate compliance order in accordance with section 69-4820.1(2), R.C.M. 1947; personal service thereof on the city clerk of Livingston pursuant to section 69-4820(1), R.C.M. 1947; and failure of the City to reply thereto within fifteen days as required by the compliance order.
The City contends the service of the compliance order was defective in that personal service on the City could only be accomplished by personal service on the Mayor under principles of common law and Rule 4, M.R.Civ.P.
In our view, the controlling statute does not require service on the mayor. *157 Service may be made on any agent of the City, either personally or by mail as stated in section 69-4820(1), R.C.M. 1947:
"When the department has reason to believe that a violation of this chapter or a rule made under it has occurred, it may have written notice served personally or by mail on the alleged violator or his agent. The notice shall state the provision alleged to be violated, the facts alleged to constitute the violation, the nature of corrective action which the department requires, and the time within which the action is to be taken. For the purposes of this chapter, service by mail is complete on the date of mailing." (Emphasis supplied.)
The express provisions of this special statute relating to service under the Montana Water Pollution Act control over general statutes relating to service of process in a civil action upon a municipality under Rule 4, M.R.Civ.P., to the extent of any inconsistency. Teamsters et al. v. Montana Liquor Control Board, 155 Mont. 300, 471 P.2d 541; In re Stevenson's Estate, 87 Mont. 486, 289 P. 566. The same can be said of statutory enactments vis-a-vis inconsistent common law principles.
We therefore hold that service of the compliance order on the City was legally made, and a claim for relief against the City for violation thereof was stated in the complaint.
The second issue concerns whether entry of summary judgment in favor of the City was correct. Here summary judgment was based on the complaint alone. Nothing outside the bare allegations of the complaint was before the district court. The district court treated the City's motion to dismiss under Rule 12(b)(6), M.R.Civ.P., as a motion for summary judgment under Rule 56(c), M.R. Civ.P., without notice thereof to the State. This was error.
The treatment of a motion to dismiss as a motion for summary judgment is governed by Rule 12(b), M.R.Civ.P., which provides in pertinent part:
"* * * If, on a motion asserting the defense numbered (6) to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleadings are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such motion by Rule 56." (Emphasis supplied.)
Here, the district court treated the City's motion to dismiss for failure to state a claim as a motion for summary judgment without notice and without affording the State a reasonable opportunity to oppose it. The State was not "given reasonable opportunity to present all material made pertinent to such motion by Rule 56" as required by Rule 12(b), M.R.Civ.P. The rationale supporting this requirement has been stated in this language:
"As soon as a motion to dismiss under Rule 12(b)(6) is converted into a motion for summary judgment, the requirements of Rule 56 become operable. It is important that the court give the parties notice of the changed status of the motion and a `reasonable opportunity to present all material made pertinent to such motion by Rule 56.' In this way no one will be taken by surprise by the conversion. Once the proceeding becomes one for summary judgment, the moving party's burden changes and he is obliged to demonstrate that there exists no genuine issue as to any material fact and that he is entitled to a judgment as a matter of law." 5 Wright & Miller, Federal Practice & Procedure: Civil § 1366, p. 683.
This identical rationale is expressed in the advisory committee notes to the 1948 amendment to Federal Rule of Civil Procedure 12(b), from which Montana's rule is modeled.
*158 Thus is was error for the district court to grant summary judgment to the City without affording the State notice and a reasonable opportunity to be heard.
We vacate the summary judgment herein and remand this case to the district court for further proceedings.
JAMES T. HARRISON, C.J., and DALY, JOHN C. HARRISON AND CASTLES, JJ., concur.
