
133 N.W.2d 860 (1965)
Ray T. BRECKWEG, Grace M. Breckweg, Robert H. Chambers, Shirley M. Chambers, and Phillips Petroleum Company, a Delaware Corporation, Plaintiffs and Respondents,
v.
Albert G. KNOCHENMUS, Curtis Eggers and Morris M. Olen, Individually and as Supervisors of Mapleton Township, Minnehaha County, South Dakota, Defendants and Appellants, and
Mr. and Mrs. Richard C. May, Mr. and Mrs. Jim Dietz, Mr. and Mrs. Edward R. Sterner, Mr. and Mrs. Edward Behrends, Mr. and Mrs. Reuben Dahl, Mr. and Mrs. Gerald J. Underberg, Mr. and Mrs. Duane M. Miller, and Mr. and Mrs. Thomas Terry, Intervenors and Appellants.
No. 10166.
Supreme Court of South Dakota.
March 16, 1965.
*862 John P. McQuillen, Sioux Falls, for Township Board, defendants and appellants.
Danforth, Danforth & Johnson, Sioux Falls, for intervenors and appellants.
Richard Hopewell, Davenport, Evans, Hurwitz & Smith, Sioux Falls, for plaintiffs and respondents.
HOMEYER, Judge.
Plaintiffs-petitioners seek a writ of mandamus to compel the supervisors of Mapleton Township to issue them a building permit for erection of a gasoline filling station. Their property is situated about three miles north of the corporate limits of the city of Sioux Falls on U.S. Highway 77 about 1/8th mile north of where such highway intersects Interstate Highway 90. From a judgment granting a peremptory writ, the township board and certain adjoining and neighboring property owners who were granted leave to intervene appeal.
The legislature in 1959 amended the statute which grants powers to townships and limited the amendment to those located within four miles of a city with a population of 50,000 or more.[1] The amendment in subdivision (f) empowered such townships "To prescribe the manner of constructing buildings and structures to be erected within the township, and to require that a building permit shall be first obtained from the board of township supervisors before the construction of any building or structure within the township." By virtue of this authority the following ordinance was adopted: "BE IT RESOLVED by the Board of Supervisors of Mapleton Township at its regular meeting held at the Mapleton Township Hall in Renner, Minnehaha County, South Dakota, on May 29, 1959, that no person shall erect, construct, enlarge, alter or repair any building or structure within Mapleton Township without first obtaining a building permit from the Clerk of Mapleton Township. A written application for such permit shall be made showing the use to be made of the building or structure and the details and the manner of construction, alteration or repair."
Petitioners[2] Breckweg and Chambers own contiguous lots on which residences have been built. On November 20, 1963, each granted Phillips Petroleum Company[3] a sixty-day option to purchase his separate property. Within time limits, Phillips exercised the options. As a condition precedent to a binding obligation, the *863 option agreements required Breckweg and Chambers to obtain from "* * * local governmental authorities appropriate zoning and/or other necessary permits authorizing use of the property as a gasoline and oil service station and merchandise store, * * *". On December 17, 1963, the optionors made written request of the township board for issuance of a building permit for a service station. On January 13, 1964, the chairman wrote optionors' counsel referring to the ordinance supra and asked for supplemental information on location of driveways, buildings, storage facilities and items of construction to be used. Additionally he wrote in the concluding paragraph: "The informal opinion of the Board of Supervisors is that this is probably not a suitable area for the construction of a gasoline filling station, but we will reserve judgment on this until the plot plan showing details and manner of construction of the proposed gas station are submitted."[4] This action followed a few days later.
Intervenors[5] own and occupy residential property in the area of the proposed location of the service station. Two of them live on adjacent lots. The average valuation of the residences is about $16,000. Water is obtained from sand point wells at a depth of from 24 feet to 28 feet. Sewage disposal is via septic tank with tile drain. Each residence has its own water supply and sewage disposal system. The construction plan contemplates moving petitioners' residences and location of the service station in place thereof.
At the hearing on the return of the alternative writ each of the supervisors testified that in his opinion a filling station in the proposed location would be detrimental to the health, safety and general welfare of the people residing in that area and gave such as the reason for denying the permit.[6] The only other witnesses were three intervenors, i. e., Mr. & Mrs. Underberg, whose property abuts the rear lot line of the Breckweg property, and Reuben Dahl, whose back property line joins the back line of the Chambers property. Dahl is a building contractor who made a practice of buying lots in the area, building homes thereon, and then selling the completed residences. These witnesses expressed apprehension that a gas station in close proximity to their residences might affect their water supply, be dangerous to small children living in the neighborhood and because of aesthetic reasons might diminish property values in the area.
No claim is made of noncompliance with any building codes and regulations[7] or zoning ordinances and restrictions. Evidently the township has never adopted any building codes or regulations since none have been called to our attention, or enacted any *864 zoning ordinances.[8] There is no contention that the area is within any rural zoning district as such may be designated by the county commissioners.[9]
In the petition for a writ respondents herein contend (1) the township board acted illegally, capriciously, arbitrarily and unreasonably in denying the application for a building permit, and (2) the ordinance was void and unconstitutional because it did not provide standards and guidelines for the exercise of any discretion permitted to the board. In resistance, appellants assert that in the exercise of a sound discretion they were authorized to deny the building permit because the construction of such filling station would be detrimental to the health, safety, and general welfare, and would constitute a nuisance. They also attack use of mandamus as an available remedy in the present case.
We are satisfied mandamus was a proper remedy under the circumstances to compel the township board and its officers to issue the building permit. Although mandamus is generally employed to compel performance of duties ministerial in character, it can also be used where judgment and discretion are involved to compel a legal exercise thereof. SDC 1960 Supp. 37.4501; Tubbs v. Linn, 75 S.D. 566, 70 N.W.2d 372. The court is not warranted in directing the manner in which a legal discretion is to be exercised. Midwest Oil Co. v. Youngquist, 69 S.D. 461, 11 N.W.2d 662. However, where the refusal to perform a legal duty is arbitrary and captious, or is founded on an invalid ground, or one not warranted by law, the board is subject to direction by the court and mandamus will issue. Minneapolis-Honeywell Regulator Company v. Nadasdy, 247 Minn. 159, 76 N. W.2d 670; 9 McQuillin, Municipal Corporations, 3rd Ed., § 26.221; 34 Am.Jur., Mandamus, § 188.
A civil township is a political subdivision of state government and like counties and municipalities, its right to act is dependent upon a grant from the state. It has only such powers as are expressly delegated by the state or are necessarily implied from expressly delegated powers. South Dakota Employers Protective Ass'n v. Poage, 65 S.D. 198, 272 N.W. 806; Custer City v. Robinson, 79 S.D. 91, 108 N.W.2d 211. Under SDC 1960 Supp. 58.0201(9) (f), Mapleton Township was granted the right to "prescribe the manner of constructing buildings and structures to be erected within the township, and to require that a building permit shall be first obtained * * before the construction * * *." We believe this power to prescribe would include the power to adopt appropriate building codes and related regulations and implies the right to regulate, restrain or prohibit the erection of buildings and structures which do not comply with standards and rules promulgated pursuant to the power *865 granted. See 7 McQuillin, Municipal Corporations, § 24.505 and cases cited in footnotes under this section.
It has been held that municipalities and townships have the power to regulate gasoline filling stations within their boundaries, and even to prohibit them in certain zones where the facts warrant it, but when this power is exercised a necessary concomitant is a valid enabling ordinance which classifies and then prescribes special regulations because of their peculiar characteristics. However, their restriction and regulation is always subject to the test of reasonableness. Socony Mobil Oil Co. v. Township of Ocean, 56 N.J.Super. 310, 153 A.2d 67; Fox v. City of Springfield, 10 Ill. 2d 198, 139 N.E.2d 732; Stratford Aire Association v. Hibser, 26 Ill.App. 214, 167 N.E.2d 586; Vedovell v. City of Northlake, 22 Ill.2d 611, 177 N.E.2d 124. In each of these cases and others cited by appellants zoning or other regulatory ordinances had been passed which served as the basis for the restraint on free use of property.
Appellants recognize the absence of any violation or noncompliance with building regulations or zoning ordinances as a predicate for denial of the building permit. Nevertheless, they say SDC 27.21 makes the township board of supervisors a board of health, and in the exercise of a sound judgment and discretion they had the right to anticipate the erection of a filling station at this location would be detrimental to the health, safety, and general well-being of people residing in the area and would be a nuisance and for such reason deny the building permit. We do not agree.
In this automotive age courts are unanimous in holding that a gasoline filling station where petroleum products are stored and sold is not a nuisance per se. Brown v. Easterday, 110 Neb. 729, 194 N. W. 798; Daniel v. Kosh, 173 Va. 352, 4 S.E.2d 381; 66 C.J.S. Nuisances § 50; Anno. 51 A.L.R. 1224; 75 A.L.R.2d 306. Appellants concede this to be the law. However, they argue because of its proposed location in a residential neighborhood it may become a nuisance. This is not a valid reason for denying a building permit. The operation of a filling station is a lawful business. If it should be so conducted as to become a nuisance parties in interest will have a remedy. Johnson v. Drysdale, 66 S.D. 436, 285 N.W. 301. The granting of the building permit does not preclude neighboring property owners from seeking to enjoin its operation as a nuisance. Dawson v. Laufersweiler, 241 Iowa 850, 43 N. W.2d 726. The permit does not and cannot authorize a nuisance and a court of equity may properly determine the question of nuisance even though the permit was issued. However, the board of supervisors cannot sit as a court of equity and in advance of construction or operation determine that a lawful business such as a filling station will result in a nuisance. Even a court of equity will not enjoin the operation of a lawful business as an anticipated nuisance unless it is shown (1) that the proposed construction or use to be made of the property is a nuisance per se; or (2) that while it may not amount to a nuisance per se, under the circumstances of the case, a nuisance must necessarily result from the contemplated act. Demont v. Abbas, 149 Neb. 765, 32 N.W.2d 737; Prauner v. Battle Creek Cooperative Creamery, 173 Neb. 412, 113 N.W.2d 518. Significantly the court found that the proposed gas station would not be a nuisance in fact.
We see no merit in appellants' argument that after the township supervisors testified that the erection of a service station at the proposed location would endanger the health and safety of residents adjacent thereto a burden devolved upon respondents to produce some evidence to the contrary. The permit was sought for a lawful business. There were no prohibitory building regulations or zoning ordinances. There was no burden on petitioners to negative what did not exist as a valid reason for denying the permit. 62 C.J.S. Municipal Corporations § 227(3).
*866 Generally an owner of property is entitled to use it as he sees fit and any ordinances which seek to inhibit its free use are strictly construed. Well founded doubts as to the meaning and scope of restrictive ordinances should be resolved in favor of the free use of property. See City of Sioux Falls v. Cleveland, 75 S.D. 548, 70 N.W.2d 62. Predictions and prophecies by neighboring property owners that a building when completed will likely become a nuisance and annoyance are not sufficient to warrant an injunction by a court. Luedke v. Carlson, 73 S.D. 240, 41 N.W.2d 552. Neither can they serve as a legal reason for township supervisors to deny a building permit to persons otherwise entitled thereto.
Lastly appellants assert since petitioners did not answer the complaint of the intervenors which alleges the erection of the filling station would be detrimental to the health, safety and general welfare of the township and would constitute a nuisance, that the truth of such allegations is admitted and consequently the writ should have been denied. SDC 1960 Supp. 33.0413 allows a complaint in intervention in proper cases and if permitted provides that both appearing and nonappearing parties may answer or plead to it as if it were an original complaint. Under this section the filing of a responsive pleading is not mandatory. Where the petition for a writ and the answer of the township as in this case raise the issue before the court, an answer to the complaint in intervention would serve no particular purpose and is not necessary. Board of Education, etc. v. Whisman, 56 S.D. 472, 229 N.W. 522; Koester v. Northwestern Port Huron Co., 24 S.D. 546, 124 N.W. 740.
Further, the hearing proceeded as if the issues were complete and this procedural irregularity, if it be considered such, was not raised in the trial court. We have repeatedly said when such questions have not been raised and preserved in the trial court, this court will not consider them on appeal. Nelson v. City of Sioux Falls, 67 S.D. 320, 292 N.W. 868.
The constitutional question alleged in the petition was not determined by the trial court and was not necessary to the relief granted. This makes it unnecessary to consider it on appeal. Haas v. Independent School District No. 1 of Yankton, 69 S.D. 303, 9 N.W.2d 707; City of Sioux Falls v. Cleveland, supra.
The board of supervisors without reason valid in law denied petitioners a building permit. This they could not do. The trial court correctly entered judgment directing issuance of the peremptory writ.
Affirmed.
All the Judges concur.
NOTES
[1]  Chapter 448, Laws of 1959, now SDC 1960 Supp. 58.0201(9).
[2]  Reference is made to Breckweg and Chambers in the singular; co-petitioners are their respective wives.
[3]  Phillips Petroleum Company is referred to as Phillips. After the action was commenced, Phillips consented to joinder with petitioners and the court so ordered.
[4]  No issue has been raised as to the form of the application for a building permit, its direction to the supervisors and not the clerk, and the nonjoinder of the clerk in the action. Consequently we assume the regularity of the application, its subsequent denial and other procedural compliance, or that such omissions or irregularities, if any, have been waived.
[5]  The petition for leave to intervene lists ten "Mr. and Mrs." owners and two single owners and was signed by counsel for such petitioners. Only eight of the former are named in the final judgment. Mr. and Mrs. Ernest Kittleson and Pete Paa signed a withdrawal. They, together with Mr. and Mrs. George Houtsma and Alfred Koopman, are not named in the judgment. The lot and residence of Pete Paa is adjacent to the north side of the Chambers property.
[6]  A few weeks before the denial of this application, the supervisors granted a building permit to a Sioux Falls construction company for the erection of a truck stop, cafe, and filling station for Mobil products to be located on the east side of U.S. Highway 77 directly across the highway from the Breckweg and Chambers property.
[7]  The design of the proposed filling station is of a pattern generally constructed by Phillips in South Dakota and elsewhere. No specific objection was made to the design, plans, materials, pumps, lighting, or any other features of the proposed station.
[8]  Chapter 448, Laws of 1959, now SDC 1960 Supp. 58.0201(9)(h) granted townships power "To regulate and restrict the height, and size of buildings and other structures and the location and use of buildings, structures and land for trade, industry, residence or other purposes, with the object of promoting the health, safety, morals and the general welfare of the township, and for such purpose to divide the township into districts for zoning purposes. * * * The powers as provided in this subsection shall be subordinate to any zoning or other powers of the county or adjoining city when such powers are, or shall be, exercised by said county or city in respect to said township."
[9]  Rural Zoning Law (1941), SDC 1960 Supp. Ch. 12.20A. Amended Ch. 37, Session Laws 1961. When adopted this statute at length detailed its purpose, method of procedure, provided for a zoning commission, for changes and adjustments, for appellate review, etc. The same was true when municipalities were granted the right to zone, (1927) SDC 45.26. Similar guides are contained in the Model Airport Zoning Law vesting zoning powers in the South Dakota Aeronautics Commission, (1943) SDC 1960 Supp. Ch. 2.05. No statutes prescribing guidelines and procedures on zoning were enacted as a part of Ch. 448, Laws of 1959. (See note 8.)
