The opinion of the Court was delivered by
Mrs. Elizabeth T. Henderson, a resident and freeholder of the City of Greenwood, is'the owner of a certain lot in said city, said lot being of triangular shape and being bounded by a railroad right of way, by West Cambridge Street and by lands of J. R. West. The railroad track crosses the street at, or very near, this lot.
It appears that Mrs. Henderson, desiring some returns from this vacant lot, entered into an agreement with a mercantile concern under the terms of which the merchant agreed to pay for the erection of a brick store building upon the lot at its Own cost; was to pay all taxes and insurance upon the property, and, after paying $100.00 per year as rental for ten years, was to deliver the entire property back to Mrs. Henderson free of all incumbrances. Thereupon Mrs. Henderson applied to the proper officer of the city for a building permit, paid the requisite fee, and received the necessary permit; There is no reference in the record to any rule, regulation, or ordinance under which this permit was issued, and we assume that it was merely a formal application as is the practice in many of the smaller cities and towns.
Before any work was done on the store building, certain persons made complaint to the city council in regard to the erection of this store building and acting thereupon the city council revoked the permit and enacted the ordinance hereinafter more fully set forth. Upon the revocation of the permit to build and the passage of the new ordinance, Mrs. Henderson applied for a new permit to build the storeroom and her application was unanimously denied by the city *19council. She thereupon entered suit contesting the constitutionality of the new ordinance and asking for a writ of mandamus to compel the issuance to her of a permit to build.
The complaint was duly served and an alternative writ issued by Judge Grimball on November 30, 1932. He made the writ returnable before Judge Featherstone, a resident of Greenwood, who disqualified himself and referred the case to Judge Ramage. The decree of Judge Ramage was filed December 30, 1932, and by it he refused the writ, but without prejudice to Mrs. Henderson to pursue any other remedy of which she might be advised. This appeal is from the order of Judge Ramage.
It appears that after the arguments before Judge Ramage' and before the rendition of his decree, he wrote to the attorneys interested, suggesting that they look into the question of collateral attack on the ordinance, as appears in 43 C. J., page 555. The attorneys complied with the request contained in the letter and discussed the question although the attorneys for Mrs. Henderson insisted that the question of collateral attack had not been raised by the return of the city. It does not appear that any amendment to the return was requested or granted.
In dismissing the cause, the Circuit Judge held that mandamus was not the proper remedy and that the ordinance prevented the issuing of the writ. He further held that “when the ordinance is declared void, then and only then would the plaintiff be entitled to a Mandamus.”
He did not pass upon the validity of the ordinance, holding that this could only be done on the equity side of the Court. He evidently considered the pending suit as being an improper collateral attack upon the ordinance. To reverse the order of the Circuit Judge upon the ground that his decision was based upon a defense (collateral attack), which was not raised by the return, or that mandamus was not the proper remedy, would merely send the cause back for another hearing before possibly another Circuit Judge with *20none of the real questions decided. We, therefore, think that as the cause is now before this Court, it will be best for all parties to consider the appeal in full, to the end that the litigation may be terminated.
We construe the complaint herein as follows:
1. A suit for mandamus.
2. A direct attack upon the constitutionality of the ordinance.
3. A prayer for a writ of mandamus in the event the ordinance is declared unconstitutional.
It thus appears that the important question in this appeal is the determination of the constitutionality of the ordinance. Should it be declared unconstitutional, the writ of mandamus should follow as a matter of course, as with the ordinance out of the way there would appear nothing before us to deny the right of Mrs. Henderson to receive her building permit.
The ordinance bears the following title:
“An ordinance forbidding the erection of any building or other structure within two hundred (200) feet of any railroad crossing within the City of Greenwood, S. C., without special permission of City Council, and providing penalties for violation.”-
The ordinance is as follows:
“Section 1. In order to further protect human life and safety within the City Limits of the City of Greenwood, S. C., it shall be unlawful hereafter to erect any building or other structure within the City Limits of the City of Greenwood, S. C., nearer than two hundred feet from any Railroad Crossing without the special permission of City Council after a full hearing upon the matter.
“Section .2. Whenever any person, firm or corporation wishes to erect any building or other structure within two hundred feet of any Railroad Crossing within the City of Greenwood, such person, firm or corporation shall first appear before City Council and furnish a complete and full *21description of such proposed building or other structure sought to be erected, and shall not erect such building or other structure unless and until permission is given by resolution of City Council.
“Section 3. All permits issued or sought to be issued by the City Engineer for any building or other structure within two hundred feet of any Railroad Crossing within the City of Greenwood, are hereby declared to be null and void, and no such building or other structure shall be erected unless first approved by ordinance or resolution as above provided, after a hearing before City Council, as provided above.”
Sections 4 and 5 provide penalties.
“Section 6. That in addition to the penalties above provided the City Council of the City of Greenwood shall have the authority to order such building or other structure as might be hereafter erected in violation of the provisions of this ordinance to be removed at the expense of such person, firm or corporation, or to remove the same and charge the expense to the property upon which building or structure is erected, or to the owner of such property.”
It is alleged that this ordinance is void as being repugnant to the Constitution of the United States and also the Constitution of South Carolina in that it tends to deprive the plaintiff of her property without due process of law. It is further alleged that the ordinance is discriminatory and unreasonable. It is to this main question our attention will now be directed.
The initial question for decision appears to be one of procedure, whether or not the plaintiff may attack the constitutionality of the ordinance, and seek a writ of mandamus in the same proceeding. We see no serious objection to this mode of procedure.
In 38 C. J., § 357, it is said: “When a building permit has been improperly revoked, mandamus is the proper remedy to compel the issuance of another permit.”
*22This action clearly alleges the impropriety of revoking the permit, alleging as the cause thereof the unconstitutionality of the ordinance.
In McQuillin on Municipal Corporations, Par. 850, it is said: “Mandamus may be invoked to test the validity of an ordinance appropriating money out of the general revenue where such appropriation is contended to be a diversion of the money of the taxpayers in contravention of the charter provisions.”
In 18 R. C. R., page 105, it is said: “The authorities are not in accord in regard to the question when the constitutionality of a statute may be raised in mandamus proceedings. The question may and generally does arise in two ways: (1) when the relator claims that a statute which if valid would excuse the respondent from the performance of an act or duty sought to be enforced; (2) when the respondent claims that the statute relied on by the relator as imposing on him the duty sought to be enforced is unconstitutional and therefore he is under no obligation to perform such duties. In the first class of cases there seems to be no reason why the relator may not attack the constitutionality of the statute relied on by the respondent as excusing him from the performance of the duty and most of the Courts have taken this view.”
In 18 R. C. L., page 214, it is said: “ * * * And when a building permit is denied for the sole reason that the erection of the character contemplated is prohibited by a regulation which is an unconstitutional deprivation of the land owner’s property rights, it would seem that as an unconstitutional statute is void and as the fact that a refusal of an officer to act if founded on a mistake of law does not preclude a remedy by a writ of mandamus, a mandate may issue to compel the issuance of a permit.”
In State ex rel. Fooshe v. Burley, 80 S. C., 127, 61 S. E., 255, 257, 16 L. R. A. (N. S.), 266, the dissenting opin*23ion clearly shows the holding of the opinion of the Court in these words: