delivered the opinion of the court:
Appellant, Joseph Kucharski, a citizen and tax-payer of the city of Chicago, filed his bill in chancery in the circuit court of Cook county to enjoin said city and its fiscal officers from paying the salaries of Metellus L. C. Funkhouser as second deputy superintendent of police and William C. Dannenberg as inspector of moral conditions, and to enjoin said Funkhouser and Dannenberg from collecting or receiving salaries as such officers. The bill is based upon appellant’s claim that the ordinance creating said offices is invalid, by reason of which no such offices are in existence, and the payment of salaries to said Funkhouser and Dannenberg is a misapplication, misappropriation and diversion *564of the public money, to restrain which a tax-payer has a right to maintain a bill.
The ordinance purporting to create the office, of second deputy superintendent of police and inspector of moral conditions was passed by the city council of the city of Chicago by a two-thirds vote of all the aldermen elected, December 30, 1912. The city of Chicago is under the Cities and Villages act, and prior to the passage of the ordinance in question had, under the authority conferred by said act, established a department of police as an executive department in the administration of the municipal government. The previous ordinance establishing said department named as offices and positions therein a general superintendent of police, an assistant general superintendent of police, 23 captains of police, 68 lieutenants of police, 327 sergeants of police, 2500 first class patrolmen, a chief of detectives, 3 lieutenants of detectives, 65 detective sergeants of the first class and 400 detective sergeants of the second class. All these offices or positions came under the City Civil Service act except the general superintendent of police and were classified by rules adopted by the civil service commission. On the 30th of December, 1912, another ordinance was passed enumerating the offices and positions in the department of police and changing the titles of some of the offices as they had existed under former ordinances. This ordinance changed the title of assistant general superintendent of police to first deputy superintendent of police and added the offices of a second deputy superintendent of police and an inspector of moral conditions. Section 1908 of the ordinance provided that the general superintendent of police, the first deputy superintendent of.police, the chief of detectives, and all captains, lieutenants, sergeants, patrolmen and operators, should be known and designated as policemen and should constitute the police force of the city of Chicago. It will be seen the second deputy superintendent of police and the inspector of moral conditions were *565not designated as policemen and included as part of the police force. Section 1913 enumerated the duties of the first deputy superintendent of police. Section 1914 provided that the second deputy superintendent of police should not be a member of the police force. Said section prescribed the duties to be performed by him under the direction of the general superintendent of police, among which duties were: “{6) The receipt and investigation of all complaints of citizens regarding members of the police force; (7) the supervision of the strict enforcement of all laws and ordinances pertaining to all matters affecting public morals; (8) the censoring of moving pictures and public performances of all kinds.” The secretary of the department, the custodian of lost and stolen property, the manager of properties, the department inspector and the director of instruction were required to report to the second deputy superintendent of police. Section 1907 created the office of inspector of moral conditions as a part of the department of police, but his duties are not prescribed by the ordinance and it is not expressly provided therein that he shall not be a member of the police force, nor is that office or position enumerated in section 1908, which purports to enumerate all the officers to be known as policemen and constituting the police force of the city.
The bill alleges, in substance, that it was the purpose in omitting the second deputy superintendent of police and inspector of moral conditions from the enumeration, in section 1908, of the officers of the police department who should be known and designated as policemen and constitute the police force of the city of Chicago, and the provision in section 1914 that the second deputy superintendent of police should not be a member of the police force, to authorize the appointment of persons to those positions without compliance with the Civil Service act and the rules of the civil service commission. The bill further alleges that 23 captains of police were next lower in rank to the sec*566ond deputy superintendent of police, and that the Civil Service act and the rules of the civil service commission required promotional examinations of those holding positions in the next lower rank for the purpose of filling the office of second deputy superintendent of police; that the inspector of moral conditions is a police (officer, only, and that only lieutenants of police, sergeants of police or detective sergeants of the first grade, they being the next lower in rank, were eligible to take the examination for promotion to the position of inspector of moral conditions, but that, contrary to law and the rules of the civil service commission, no promotional examinations were held but an original examination was held, and Funkhouser and Dannen-. berg were certified as having passed the examinations with the highest grades and for appointment to their respective positions. The bill further alleges that persons admitted to take said examinations were not members of the police force of the city of Chicago and that Funkhouser resided in the town of Evanston. A demurrer was sustained to the bill and a decree entered dismissing the bill for want of equity. The trial court certified that the validity of an ordinance was involved and the public interest required that an appeal be allowed direct to this court.
Appellant concedes that if Funkhouser and Dannenberg were de facto officers exercising the duties of a de jure office the remedy by .a bill for an injunction is not the proper one, as in such case a court of equity will not restrain officers from performing the duties and receiving the salaries of such offices. It is not denied the city council had authority to create the offices of second deputy superintendent of police and inspector of moral conditions, but it is contended the ordinance creating them is invalid, because they were authorized by said ordinance to be filled contrary to the provisions of the Civil Service act. Beyond question the city council had authority, under sections 2 and 3 of article 6 of the Cities and Villages act, to create said offices *567and prescribe their duties and powers. (People v. McCann, 247 Ill. 130; Moon v. Mayor., 214 id. 40; Stott v. City of Chicago, 205 id. 281.) If it be conceded that the provision of section 1914 of the ordinance that the second deputy superintendent of police shall not be a member of the police force, and the omission of said office and the office of inspector of moral conditions from the enumeration in section 1908 of the officers of the department designated as policemen and constituting the police force of the city of Chicago, were invalid, would it invalidate the ordinance creating the offices ? If the council had authority to create said offices and they were created in the manner required by law, would the fact that the ordinance authorized filling them in an illegal manner render void the ordinance creating the offices ? We think the answers must be in the negative unless the alleged invalid provisions in the ordinance render the whole ordinance void. A part of a statute or ordinance may be invalid and a part valid, unless all the provisions are so connected in subject matter and so dependent upon each other as to warrant the belief that the legislative body would not have passed the valid part independently of the invalid part. (People v. Strassheim, 240 Ill. 279; People v. Knopf, 183 id. 410; 1 Lewis’ Sutherland on Stat. Const, sec. 296; Freeport Street Railway Co. v. City of Freeport, 151 id. 451.) “The constitutional and unconstitutional provisions may even be contained in the same section and yet be perfectly distinct and separable, so that the first may stand though the last fall. * * * If when the unconstitutional portion is stricken out that which remains is complete in itself and capable of being executed wholly independent of that which was rejected, it must be sustained.” (Cooley’s Const. Lim. 178.)
Under the rules of construction we think it must be held that if the parts of the ordinance appellant alleges are invalid are so in fact, still it would not invalidate the whole ordinance, and by the valid portions of the ordinance the *568• offices of second deputy superintendent of police and inspector of moral conditions were created and are de jure offices, and their status as such offices would not be affected even though the ordinance contained invalid provisions as to the manner of filling said offices. The offices having been legally created, the right of de facto incumbents to hold them, discharge their duties and receive the salaries provided by law could not be inquired into in this form of action. Ravin v. Commissioners of Cook County, 245 Ill. 496; Marshall v. Illinois State Reformatory, 201 id. 9; Burgess v. Davis, 138 id. 578.
The decree of the circuit court is affirmed.
Decree affirmed.