In November, 1967 B. John Tutuska, then the Sheriff of Erie County, requested the Commissioner of Personnel of Erie County to take steps to place the criminal division personnel of the Sheriff’s Department under competitive civil service. Subsequently, Sheriff Tutuska sent a letter to the Board of Supervisors of Erie County, predecessor of the County Legislature, informing them of the communication to the Commissioner of Personnel and requesting that further studies be made along the lines suggested by the Sheriff to carry out the implementation of civil service status for the law enforcement division of the Sheriff’s Department. The matter was taken under advisement by the Public Safety Committee and, on October 7, 1969, the Erie County Legislature adopted a resolution requesting the County Attorney to investigate the possibility and method of securing civil service status for criminal division deputy sheriffs. The County Attorney prepared proposed Local Law No. 2,1969 (Local Laws, 1969, No. 2 of County of Erie), which was then adopted by the Erie County Legislature on October 21, 1969, and, after a public hearing, was signed into law on November 25, 1969, by B. John Tutuska, who was then County Executive.
Local Law No. 2, 1969 provides as follows:
“ Section 1. The Erie county charter is hereby amended by adding thereto a new section, to be section fifteen hundred three to read as follows:
“ § 1503. Deputies and employees. All deputies and employees of the sheriff of Erie county except the undersheriff, the secretary to the sheriff, and his civil deputies, are hereby placed in the competitive classified service and shall be hired by competitive examinations under the provisions of the Civil Service Law of the state of New York, and such deputies and employees shall be subject to and governed and controlled by the rules and regulations of the New York State department of civil service.
“ § 2. Notwithstanding the provisions of the foregoing, however, all employees of the sheriff, except the undersheriff, the secretary to the sheriff and his civil deputies, who have served for one year in their respective positions prior to the effective date of this local law, shall be covered in their respective positions without examination.
“ § 3. This local law shall become effective immediately.”
In effect the law places all criminal division deputies of the Sheriff’s Department in the competitive class of civil service as well as all criminal division employees in their respective *418positions without examination who have served for one year prior to the enactment of the law.
An examination of the organization of the Sheriff’s Department of Erie County is necessary to demonstrate the impact of the law. County Executive Tutuska was Sheriff from September 1,1959 to November 30,1968. In his affidavit, he stated that it was the practice in the department to deputize all employees of the department regardless of what position they filled and to assign specific duties to certain deputies and restrict them to those duties. Since at least 1956, deputies were recruited for specific positions in the department, and, upon being sworn in, were trained to fill the specified positions. At all times deputy sheriffs were ordered to exercise their powers only to carry out duties specifically assigned to them, and deputies were never employed other than in the position for which they were.recruited and hired. As of November, 1967, that definition of specific duties within the Sheriff’s Department and the assignment of personnel to such duties on an unchanged and continuing basis had become so standardized that Tutuska informed the Commissioner of Personnel and the County Legislature of his desire to carry out the implementation of civil service status for the law enforcement division of the Sheriff’s Department. Thomas W. Byan, who was Sheriff from December 5, 1968 to December 31, 1969, stated in his affidavit that at all times civil division deputies were restricted to the execution of civil processes and that criminal division deputies were restricted to criminal duties. There was a departmental rule that criminal division deputies were not to perform any function of .the civil division of the department. The Commissioner of Personnel of Erie County stated in his affidavit that prior to receiving the communication from Sheriff Tutuska in November, 1967, he had classified the positions in the Sheriff’s Department under Appendix E (exempt) since he was under the impression that all deputy sheriffs had both civil and criminal duties and were, therefore, not under the jurisdiction of civil service. After the enactment of Local Law No. 2 he examined in detail the duties of every member of the Sheriff’s Department, and found that certain positions in the Sheriff’s Department were completely noncivil in nature. Louis Busso, Budget Director of Erie County, stated that the budget for the Sheriff’s Department and the jail was broken down into line items which specified the positions of criminal division deputies and civil division deputies, in addition to other positions. Based on its own investigations, the County Legislature, prior to enacting *419Local Law No. 2, had found that the Sheriff appointed and trained his deputies to perform definite duties and differentiated such duties and positions as deputies engaged in conservation of the peace and law enforcement and deputies engaged in civil work in his office. All employees in the Sheriff’s Department, whether laborers, stenographers, bookkeepers, civil division deputies or criminal division deputies were all designated “ deputy sheriffs ” even though their positions and jobs were not, in fact, positions and jobs constituting the work of a deputy sheriff.
On November 4, 1969, respondent Michael Amico, was elected Sheriff of Erie County and was sworn in on January 1, 1970. He commenced this action on December 23, 1969 by the service of a summons and complaint upon the appellants and moved for summary judgment for the relief demanded in the complaint. On December 30, 1969 the court restrained all parties from acting under Local Law No. 2, 1969 until the matter was finally determined. A summons and an amended complaint were served upon the appellants on January 30,1970. Respondent sought a judgment declaring that Local Law No. 2,1969 was unconstitutional, illegal, and invalid in that it was a violation of section 6 of article V of the New York State Constitution, section 41 (subd. 1, par. [b]) of the Civil Service Law, section 209-q of the General Municipal Law, section 2002 of the Erie County Charter (Local Laws, 1959, No. 1 of County of Erie), and further because it was vague, indefinite and indeterminative as to its application.
Subsequently, the County Attorney, on behalf of the appellants, moved to dismiss the complaint pursuant to CPLR 3211 (subd. [a], par. 7) on the ground that the complaint failed to state a cause of action. On the return date of that motion, the appellants requested that the court consider their motion to dismiss as a motion for summary judgment under CPLR 3211 (subd. [c]). Respondent also moved in open court for summary judgment based upon the amended complaint and appellants’ affidavits.
The court granted respondent’s motion in all respects and entered judgment declaring Local Law No. 2 to be invalid, unconstitutional, and in violation of law and of no force and effect. From such order and judgment appellants appeal.
The court found that the employees of the Sheriff are clearly exempt from civil service under section 41 (subd. 1, par. [b]) of the Civil Service Law since they are " deputies of principal executive officers authorized by law to act generally for and *420in place of their principals ” (64 Misc 2d, at p. 834). The court also found that the law as enacted is too vague and indefinite to determine its application fairly since it excepts a group from the competitive class for the vague reason that they are “ civil deputies ”.
The Civil Service Law was enacted pursuant to directives contained in the State Constitution. Section 6 of article V of the Constitution provides, in part, as follows: ‘ ‘ Appointments and promotions in the civil service of the state and all of the civil divisions thereof, including cities and villages, shall be made according to merit and fitness to be ascertained, as far as practicable, by examination which as far as practicable, shall be competitive ”. Thus, the fundamental purpose of the civil service provisions is that positions in the civil service are to be filled by competitive examination so far as practicable. (See Matter of Andresen v. Rice, 277 N. Y. 271.)
Section 35 of the Civil Service Law divides the civil service of the State into the unclassified and the classified service. The classified service contains four classes: exempt; noncompetitive; labor; and competitive (§ 40). Included in the exempt class are “ the deputies of principal executive officers authorized by law to act generally for and in place of their principals ” (§ 41, subd. 1, par. [b]). The purpose of the exempt class is to permit an appointment without civil service examination. (Matter of Byrnes v. Windels, 265 N. Y. 403.) Thus, the first problem is to determine whether deputy sheriffs come within the exemption stated in section 41 (subd. 1, par. [b]).
We do not construe section 41 (subd. 1, par. [b]) to mean that every deputy must necessarily be put in the exempt class. " The mere use of the word ‘ deputy ’ may not in and of itself create the exception ”. (Matter of Byrnes v. Windels, supra, p. 407. • See, also, Matter of Steen v. County of Nassau, 179 Misc. 821, affd. 265 App. Div. 858.) The term “deputy” as used in the statute does not refer to an employee improperly or for convenience named a deputy, who has no right under a statute to act for or in place of his principal officer. (People ex rel. Ostrander v. Morton, 12 Misc. 476, affd. 146 N. Y. 404. See, also, Van Fleet v. Walsh, 122 Misc. 316.) What is required is that there be some statute investing the deputy with the authority to take over and perform the duties of his principal officer or a statute authorizing the principal officer to delegate his' duties to such deputy. (Matter of Behringer v. Parisi, 5 N Y 2d 147; Matter of Byrnes v. Windels, supra; Matter of Klipp v. New York State Civ. Serv. Comm., 42 Misc 2d 35, *421affd. 22 A D 2d 854, affd. 15 N Y 2d 880.) In determining this issue, it must be kept in mind that the exemptions contained in section 41 of the Civil Service Law are the exception and not the rule, and should accordingly be strictly construed. (Matter of Martin v. Burke, 25 Misc 2d 1042, affd. 15 A D 2d 730.)
A deputy sheriff does not come within the exemption of section 41 (subd. 1, par. [b]) since he is not authorized by law to act generally for and in place of his principal officer. Subdivision a of section 15.03 of the Erie County Administrative Code (Local Laws, 1960, No. 1 of County of Erie) provides that ‘ ‘ The sheriff shall appoint an undersheriff and may appoint such deputies, other clerks and employees within the limits of the appropriations therefor, as he deems necessary for the conduct of his office.” There is no provision in either the County Law or the Erie County Administrative Code which authorizes a deputy sheriff to act generally for and in place of the sheriff. Bather, only the undersheriff has received this authorization. Subdivision 1 of section 652 of the County Law provides that ‘ ‘ During the absence or inability of the sheriff to act or when a vacancy shall occur in the office of the sheriff, the undersheriff shall, in all things, execute the duties of the office of sheriff until a new sheriff is elected or appointed and has qualified.” Subdivision b of section 15.03 of the Erie County Code contains a similar provision. Also, subdivision 2 of section 652 of the County Law provides that “Any person may also be deputed by any sheriff or undersheriff by written instrument to do particular acts ”. Subdivision d of section 15.03 of the Erie County Code contains a similar provision. There is no possible way that a deputy sheriff can succeed to the authority of the sheriff, even if there is no undersheriff. Section 651 of the County Law provides that, ‘ ‘ When a vacancy shall occur in the office of sheriff, and there be no undersheriff to perform the duties, the county judge shall designate and appoint some suitable and proper resident of the county to perform the duties of sheriff until a new sheriff is elected or appointed and has qualified.” It is clear from the above statutory provisions that the “ deputy ” contemplated by section 41 (subd. 1, par. [b]) of the Civil Service Law to be exempt from the civil service is the undersheriff, and not the deputy sheriffs. This is particularly so since the record demonstrates and plaintiff admitted on oral argument before this court that all employees of the Sheriff’s Department, whether they be a stenographer, laborer, or deputy sheriff, are designated “ deputies ’ ’. It would be contrary to the constitutional mandate to *422allow these employees to be exempt from civil service merely because they have been termed deputies. Respondent contends that section 9 of the Public Officers Law mandates a contrary conclusion. However, because of the specific provisions made in sections 651 and 652 of the County Law for the performance by the undersheriff of the powers and duties of the sheriff in the latter’s absence or inability to act, or during a vacancy, and for the appointment of a new sheriff in the event there is no undersheriff, section 9 of the Public Officers Law is inapplicable. It is, therefore, concluded that deputy sheriffs are not exempted from the competitive class of civil service by section 41 (subd. 1, par. [b]) of the Civil Service Law.
It next must be determined which, if any, of the deputy sheriffs are subject to be classified in the competitive class of the civil service. The early case of Matter of Blust v. Collier (62 App. Div. 478) held that deputy sheriffs come within both the letter and the spirit of subdivision 1 of section 12 of chapter 370 of the Laws of 1899, now section 41 (subd. 1, par. [b]). The court felt that the position was a confidential one, and, therefore, from its very nature one which necessarily was exempt from the competitive class. However, the Court of Appeals, in Matter of Flaherty v. Milliken (193 N. Y. 564) came to a contrary conclusion. In the Flaherty case, the Sheriff of Kings County sought to compel the State Civil Service Commission to certify the payroll of the assistant deputy sheriffs, jail keepers, van drivers, and matrons in his office. Despite these positions having been placed in the competitive class by the State commission, the Sheriff had nevertheless made the appointments solely in his own discretion. The court found that the threshold question was whether the deputies, assistant deputies, and other appointments of the Sheriff were, insofar as they discharged the duties of the Sheriff relating to civil process, in the service of the county or in the service of the Sheriff personally; for if they were in the service of the Sheriff, and not the county, the positions they held fell neither within section 6 of article V of the Constitution, nor within the purview of the Civil Service Law. The court then embarked on an historical study of the powers and responsibilities of the sheriff. The court concluded that the civil business of the sheriff was plainly and exclusively his own, and that he, not his deputies or subordinates, was responsible for their negligence or misconduct in the execution of civil process. Thus, any deputy or employee of the sheriff whose duties relate to the execution of civil process is in the service of the sheriff personally, and is not subject to the Civil Service Law. The *423court, however, found that the relation between the sheriff and the appointees who discharge the criminal functions was substantially different. Since the sheriff is responsible for the default of his appointees in criminal proceedings only where he has been personally responsible for the default, the relation of the sheriff and his deputies is not strictly that of principal and agent, and the doctrine of respondeat superior does not apply. The court thus came to the following conclusion (193 N. Y., at p. 569): “We think, therefore, that all appointees of the sheriff whose duty relates exclusively to the functions of the sheriff’s office in criminal matters should be considered in the service of the public and not of the sheriff personally, and are subject to the civil service regulations.” The court went on to conclude that where there is no separation of duties between civil and criminal functions, the employees of the sheriff must also be held exempt from the civil service regulations.
It is crucial to note that employees of the sheriff performing civil functions or both civil and criminal functions, are held to be exempt from the civil service not because they are “ deputies ” within the meaning of section 41 (subd. 1, par. [b]) of the Civil Service Law but because they hold a position confidential to the sheriff and are his personal agents, and are therefore not in the service of the county or the people. (See 1915 Opns. Atty. Gen. [vol. 2] 418, 441.) The holding in Flaherty was reconsidered and reaffirmed by the Court of Appeals in Matter of O'Brien v. Ordway (218 N. Y. 509) and in Matter of Grifenhagen v. Ordway (218 N. Y. 451). Subsequent cases have held that only employees of the sheriff whose duties include civil matters are employed by the sheriff personally, not by any political subdivision of the State, and are therefore not subject to the regulations of the Civil Service Law. (See, e.g., Enstrom v. City of New York, 258 App. Div. 672; Matter of Quirino v. Dempsey, 252 App. Div. 793; Matter of Fuller v. Walsh, 245 App. Div. 797; Matter of Nerling v. Walsh, 245 App. Div. 796; De Iorio v. County of Suffolk, 48 Misc 2d 584.)
It is clear from the above that all employees of the Sheriff’s Department, other than the undersheriff, whose duties are related solely to criminal functions and law enforcement, are subject to the regulations of the Civil Service Law and, like other law enforcement officers, are subject to classification in the competitive class. (Cf. Matter of Andresen v. Rice, 277 N. Y. 271.)
*424It is not unusual to distinguish between sheriff’s deputies., whose duties relate solely to civil process, and deputies whose duties relate solely to law enforcement or criminal matters. In determining the liability of the sheriff for the acts of his deputies, the courts have, of necessity, attempted to distinguish between civil division personnel and criminal division personnel. (See, e.g., Isereau v. Stone, 3 A D 2d 243.) This dual role of the sheriff and his deputies is recognized in section 650 of the County Law which provides that ' ‘ The Sheriff shall perform the duties prescribed by law as an officer of the court and conservator of the peace within the county.” It cannot be said, therefore, that a civil service provision which exempts from its application civil division personnel and, therefore, only applies to criminal division personnel, is vague and unclear. The issue only involves a determination of which deputies actually perform only criminal functions. But this is a determination for the Personnel Commissioner of Erie County after a study of the duties of the employees of the Sheriff’s Department. In fact, the Commissioner has already made such a study and has found that certain deputies do in fact perform solely criminal functions and are, therefore, subject to civil service. We hold therefore that Local Law No. 2 is valid insofar as it places all deputy sheriffs in the competitive class of the civil service whose duties include only criminal functions.
Respondent contends that Local Law No. -2 is in direct conflict with section 6 of article V of the New York Constitution in that it provides for permanent appointment in the civil service for individuals whose fitness and merit have not been determined by competitive examination. Section 6 of article V provides as follows: ‘‘ Appointments and promotions in the civil service of the state and all of the civil divisions thereof, including cities and villages, shall be made according to merit and fitness to be ascertained, as far as practicable, by examination which, as far as practicable, shall be competitive ”. This provision of the Constitution declares in unmistakable terms that merit, ascertained as provided, shall govern appointments and promotions in the public service. No administrative officer may violate the provisions of the Constitution, and no court may sanction a violation. Likewise, no Legislature may disregard, evade, or weaken the force of that mandate. (Palmer v. Board of Educ., 276 N. Y. 222; Matter of Carow v. Board of Educ. of City of N. U., 272 N. Y. 341.) While this mandate applies to every position in civil service, the Legislature may, however, determine whether it is practicable to ascertain merit *425and fitness for a particular position by competitive examination or by any examination at all. (Matter of Carow v. Board of Educ. of City of N. Y., supra.) By section 2 of Local Law No. 2, all those employees of the Sheriff’s Department who have performed functions solely in the criminal division for one year prior to the effective date of Local Law No. 2 are placed under the protection of the civil service without the requirement of taking an examination. In effect, the County Legislature has made the determination that such employees are qualified by experience and that it is not practicable to require them to take an examination. Ample authority exists for this determination.
It is well settled in New York that where an office was originally in the exempt class and is reclassified in the competitive class, the incumbent’s tenure is not affected and he is not classified out of office. An incumbent may retain his position without the necessity of taking any examination whatsoever where his position is reclassified from exempt to competitive, provided that his appointment was legal when made. (Matter of Rohr v. Kenngott, 288 N. Y. 97; Matter of Sandford v. Finegan, 276 N. Y. 70; Matter of Fornara v. Schroeder, 261 N. Y. 363; Matter of Kinsella v. Kern, 168 Misc. 847, affd. 254 App. Div. 834; Matter of Jampol v. Finegan, 167 Misc. 823, affd. suit nom. Matter of Jampol v. Kern, 254 App. Div. 733, affd. 280 N. Y. 659; Opns. Atty. Gen., 24 N. Y. St. Dept. Rep. 383.) If the incumbent was not legally appointed in the first instance, he has no legal right to the position and is subject to removal at will. (Matter of Sikich v. Hughes, 274 App. Div. 675.) But, if his appointment was legal when made, he may be ' ‘ covered in ’ ’ and is then entitled to the same security of tenure he would have had if he had been appointed after competitive examination. (Matter of Rohr v. Kenngott, supra.)
Respondent contends that the Local Law No. 2 covers in members of the Sheriff’s Department whose appointments were not legal when made. To this effect, respondent cites section 58 of the Civil Service Law and section 209-q of the General Municipal Law. Both of these provisions specify certain requirements with respect to the training and qualifications of police officers. Even assuming that a certain number of illegal appointees exist, this in and of itself would not render Local Law No. 2 invalid. As stated previously, only those persons whose appointments were legal when made may be covered in. It is, therefore, the responsibility of the Personnel *426Commissioner of Erie County to see to it that persons whose appointments were not legal when made are not placed in the competitive class without examination. Local Law No. 2 cannot reasonably be interpreted to require that which is illegal. It must therefore be interpreted to require that only those employees of the Sheriff’s Department whose appointments were legal when made are covered in.
We hold, therefore, that Local Law No. 2 is valid insofar as it covers in all employees of the Sheriff’s Department (whether or not they are deputy sheriffs) whose duties relate solely to criminal matters; who have performed those duties for a year or more prior to the effective date of Local Law No. 2; and whose appointments were legal when made.
Respondent contends that a permissive referendum was required before Local Law No. 2 could be effective under section l.(subd. [h], par. [2]) of article IX of the Constitution and subdivision 4 of section 34 of the Municipal Home Rule Law since Local Law No. 2 “ abolishes and curtails and transfers to another county officer powers of an elected county official Respondent likewise contends that a mandatory referendum is required by section 2002 of the Erie County Charter since Local Law No. 2 changes the powers of an elected county officer. In support of these contentions, respondent cites several cases which hold, generally, that legislation that curtails the unfettered discretion of an elective official in appointing or removing subordinates, changes or curtails the powers of that official. Therefore, such legislation must be submitted to referendum. (See Matter of Doherty v. Sanvidge, 58 Misc 2d 347; Neils v. City of Yonkers, 38 Misc 2d 691; Matter of Fogarty v. Warden, 191 Misc. 916, affd. 273 App. Div. 910, affd. 297 N. Y. 963.)
These eases are .readily distinguishable since none of them deals with the civil service. It has been held that civil service regulations do not conflict with the power to appoint or remove, but only prescribe the procedure for making the appointment or removal. (Matter of Seeley v. Stevens, 190 N. Y. 158.) Thus, while the power of appointment and removal is still with the- Sheriff, “it is subject to legislative regulation as to the mode and manner, and is brought within the operation of general laws on that subject.” (People ex rel. McClelland v. Roberts, 148 N. Y. 360, 367). (See, also, People ex rel. Qua v. Gaffney, 142 App. Div. 122, affd. 201 N. Y. 535.) The Constitution must be read and considered in all its different parts and must be so construed as to operate harmoniously. In order *427to nullify Local Law No. 2, which was enacted pursuant to the mandate of section 6 of article V of the Constitution, it must be found that it is' so repugnant to and in conflict with section 1 (subd. [h], par. [2]) of article IX of the Constitution that they cannot both stand or be reconciled in any reasonable way. (Matter of Seeley v. Stevens, supra.) It cannot be said that such is the case, and Local Law No. 2 should be given full force and effect. It is clear that leaving to the disposition of the electorate the enforcement of the constitutional mandate that appointments and promotions be made according to merit and fitness would render that mandate totally ineffective. We accordingly hold that reclassifications under the Civil Service Law are not subject to referendum.
Before it can be found that Local Law No. 2, 1969 is invalid, void, and unconstitutional, it must be shown that the Erie County Legislature in enacting the law has clearly usurped a prohibited power. (Matter of Richer v. Village of Hempstead, 290 N. Y. 1.) This, respondent has failed to do in all respects. Accordingly, the order and judgment appealed from should be reversed and judgment should be entered in favor of appellants declaring Erie County Local Law No. 2, 1969 constitutional and valid.
Del Vecchio, J. P., Witmer, Gabrielli and Cardamone, JJ., concur.
Judgment and order unanimously reversed on the law without costs and summary judgment granted in favor of defendants declaring Erie County Local Law No. 2, 1969, valid and constitutional.