
21 Cal.App.2d 557 (1937)
In the Matter of the Application of C. M. FASSETT for a Writ of Habeas Corpus.
Crim. No. 420. 
California Court of Appeals. Fourth Appellate District.  
June 25, 1937.
 Hugh B. Maddox and Head, Wellington & Jacobs for Petitioner.
 W. F. Menton, District Attorney, for Respondent.
 Barnard, P. J.
 The petitioner was arrested pursuant to a complaint charging him with a violation of Ordinance No. 366 of Orange County which is entitled "An Ordinance regulating the operation and location of hog ranches and providing for the issuance of permits for such business in the county of Orange, State of California, and providing penalties for the violation thereof."
 The petitioner is an employee of the L. and N. Feeding Corporation. On February 18, 1937, a permit to conduct a hog ranch on certain premises described in the petition was issued to this corporation by the county of Orange. On March 30, 1937, a permit was issued by this county allowing this corporation to erect hog pens on these premises. These permits were issued pursuant to another ordinance of that county, No. 351, which established certain land classification districts throughout the county and regulated the manner in which property might be used in different districts. Pursuant to said permits this corporation commenced the erection of buildings, *559 pens and feed troughs on April 1, 1937,and commenced the feeding of swine on said premises on April 29, 1937.
 On April 29, 1937, this corporation was notified by letter that each of these permits "is deemed to be void and of no effect on the ground that you have failed to comply with the provisions of Ordinance No. 351". While these notices failed to state the respect in which that ordinance had not been complied with, some attempt is here made to show that the feeding pens on these premises were constructed at a less distance from the nearest house than that required by that ordinance. So far as appears in this record no such violation occurred but that matter is immaterial here as this petitioner was not charged with any violation of that ordinance.
 Ordinance No. 366 was adopted by the board of supervisors of Orange County on May 5, 1937. This ordinance defines a commercial hog ranch as any premises where more than 40 head of swine are kept or fed or where two or more head of swine are kept and fed upon garbage which is not produced upon the premises. Section 2 of the ordinance reads as follows:
 "It shall be unlawful for any person, firm or corporation to engage in, conduct, manage or carry on, a commercial hog ranch, or use any property in the County of Orange for a commercial hog ranch, without first having procured a permit therefor from the Board of Supervisors of the County of Orange, as provided herein, except that any person, firm or corporation which is and has been actually and lawfully operating a commercial hog ranch at the time this Ordinance becomes effective continuously on the same premises during a period of not less than one year immediately prior thereto and against whom no complaint is pending at the time this Ordinance becomes effective shall be granted a permit under this Ordinance to maintain not more than the number of swine on said premises on the effective date hereof, provided application therefor is made in writing within thirty (30) days thereafter and no fee shall be necessary in such case. An application to increase the number of swine to be maintained on any such established hog ranch may be granted under the terms of this Ordinance without regard to location thereof and without fee."
 The ordinance then provides that any person or corporation desiring to secure such a permit shall pay a fee of $25 *560 and comply with certain regulations therein named. These regulations are much more severe and burdensome than those of Ordinance No. 351, with respect to where a hog ranch might be maintained and with respect to the manner in which buildings and pens should be constructed and, in one respect at least, it may be seriously questioned whether those regulations could be complied with by anyone.
 It is conceded that after the adoption of this ordinance the L. and N. Feeding Corporation increased the number of hogs kept on the premises in question to about 50 head, and the arrest of petitioner followed. It is petitioner's contention that Ordinance No. 366 is unreasonable and discriminatory, and that it violates the Fourteenth Amendment to the Constitution of the United States in that it denies to petitioner the equal protection of the law and abridges his privileges and immunities, and that it violates section 21 of article I of the Constitution of this state in that it grants to certain citizens privileges and immunities which are not granted upon the same terms to other citizens. In our opinion these contentions must be sustained.
 That the business of raising hogs may, under some circumstances and in some places, constitute a nuisance and that the management and operation of such a business may be made subject to proper and reasonable regulation, may be conceded. [1] The well-established rule that a law is general and uniform and affords equal protection in its operation when it applies equally to all persons embraced within a certain class to which it is addressed is subject to the equally well-established rule that the class so set apart must be founded upon some natural or intrinsic or constitutional distinction between the persons composing it and others not embraced within it. (In re Weisberg, 215 Cal. 624 [12 PaCal.2d 446].)
 [2] It seems at once apparent that the ordinance here in question does not comply with the rule last referred to. While the nuisance possibilities, or perhaps probabilities, in the business of raising hogs furnishes a natural and intrinsic distinction between persons engaged in that business and others not so engaged, we are unable to see any natural, intrinsic or reasonable distinction between persons who have been engaged in that business at a particular location for a period of one year and others who have been thus established for a shorter period of time, perhaps only for eleven months *561 and twenty-nine days. If there is any natural distinction at all, based upon the length of time during which such a business has been conducted at a certain place, it would appear to be more natural and reasonable to expect that the likelihood of the business becoming a nuisance would be increased and not lessened by the passage of time. Under the terms of this ordinance one who has been engaged in such a business on certain premises for the period of one year, without the payment of any fee and without complying with any regulations other than those that may have been provided for in previous ordinances, may proceed with his business with any number of hogs, no matter how large, which he has previously maintained and may, without fee or further regulation, obtain a permit for any increased number, and this without regard to the location of his business. On the other hand, one who is engaged in exactly the same sort of business, and who has complied with the same regulations as those imposed upon his favored competitor, but who happens to have moved his location within a year or to have established his business within that time, must, before he can operate or continue to operate, pay a fee of $25 and comply with additional regulations, with respect to his location and the manner in which his equipment is constructed, which are much more onerous and with which it would be difficult and expensive, if not impossible, to comply. The ordinance in question is so patently discriminating, as between persons of the same class, as to strongly suggest that it was so intended.
 In the early case of Lassen County v. Cone, 72 Cal. 387 [14 P. 100], an ordinance purporting to impose a license tax upon sheep pastured in that county, but which was not to be paid by those who had listed their sheep as taxable property in that county, was held to be violative of section 21 of article I of the state Constitution. The respondent cites a number of cases where regulations imposed upon certain classes have been upheld but none are cited, and we think none can be cited, where any discrimination of the nature here involved or resembling it in any degree has been sustained.
 For the reasons given it is ordered that the petitioner be discharged and his bail in this proceeding exonerated.
 Marks, J., and Jennings, J., concurred.
