Defendant applied to plaintiff city, a city under the commission form of government, for a permit to erect a one-story brick building within the fire limits of the city. The permit was granted, then revoked, and this action was brought by the city and P. C. Morrison to enjoin defendant from constructing the building. Plaintiff city appeals from an ord'er overruling a demurrer to one of the separate defenses contained in defendant’s answer.
This defense alleges among other things, that the defendant’s proposed building is to be erected for the purpose of a moving picture show; that the specifications therefor in all respects comply with the laws and ordinances of the city; that the action of the board of commissioners of the city in refusing the' permit is willful, selfish, arbitrary, malicious, and without excuse, and for the purpose of injuring, annoying, damaging, andi harassing defendant and for the purpose of allowing one of the city commissioners to complete and get in operation a moving picture show in the adjacent building -in process of erection by co-plaintiff Morrison, and that during the time between the granting of the permit and its revocation defendant purchased a large quantit)r of buildng material for his building. The specifications for the building, set out in full in the answer, show that they complied with the ordinances of the city, except the ordinance prohibiting the erection of a one-story building upon certain territory, including defendant’s lot.
[1] We find no statutory authority for the latter ordinance; hence it exceeded the city’s power. The only question remaining is whether the answer set up a defense, viz., whether the city commissioners may arbitrarily refuse a building permit to one *272who has complied, or plans to comply, with all the laws and ordinances of the city in respect to building operations.
[2] Much elementary matter is urged in the brief asserting the independence 'of the legislative and administrative departments of the government from interference by the judicial powef, with which we entirely agree; but the answer in this case takes it out of the operation of the ordinary rule. We grant that the general rule is clearly stated in Dillon on Mun. Corp, § 95.
“Generally the judicial tribunals will not interfere with municipal corporations in their internal police and administrative government, unless they are transcending their powers, or some cleat right has been withheld, or wrong' perpetrated or threatened.”
But the answer in the present case alleges facts which show that the city did abuse its discretion in refusing the permit.
[■3] To sustain a building ordinance, in the first place, it must be subject to a uniform rule of action, and cannot depend upon the arbitrary decision of the city authorities. 4 R. C. L. 395; City of Sioux Falls v. Kirby, 6 S. D. 62, 60 N. W. 156, 25 L. R. A. 621; State v. Tenant, 110 N. C. 609, 14 S. E. 387, 15 L. R. A. 423, 28 Am. St. Rep. 715; Bostock v. Sams, 95 Md. 400, 52 Atl. 665, 59 L. R. A. 282, 93 Am. St. Rep. 394; Boyd v. Board, 117 Ky. 199, 77 S. W. 669, 111 Am. St. Rep. 240. In McQuillin, Mun. Corp. § 949, the rule is stated thus:
“The ordinance exacting a permit, 'of course, must prescribe reasonable conditions and uniform regulations, and avoid the delegation of power, or the conferring of authority arbitrary in its nature upon the office or department charged with the duly and responsibility of administering the law.”
The judgment and discretion that may be exercised by the city authorities are not to be arbitrarily exercised, but are to be centered upon the question whether the applicant for the permit plans to comply with the ordinances. If he does, then he is entitled to the permit. By the demurrer appellant city concedes that the defendant has brought himself within the provisions of the ordinances.
Assuming that the ordinances of the city (except the one prohibiting one-story structures) were within the power of the city to enact, the enforcement of them by the city, as disclosed 'by the answer, was arbitrary and unlawful, and1 therefore the por*273tion of the answer demurred to stated a defense to the cause of, action.
The order appealed from is affirmed.