
16 Cal.2d 636 (1940)
THE PEOPLE ex rel. B. C. CHAPMAN, Appellant,
v.
RUDOLPH A. RAPSEY, Respondent.
S. F. No. 16379. 
Supreme Court of California. In Bank.  
November 27, 1940.
 Earl Warren, Attorney-General, Leon French and F. Walter French, Deputies Attorney-General, and Kirkbride & Wilson for Appellant.
 J. W. Coleberd for Respondent.
 CARTER, J.
 This is a proceeding in quo warranto instituted by plaintiff and appellant with the authorization of the Attorney-General of California pursuant to the provisions of section 803 of the Code of Civil Procedure to determine by what right and authority the defendant and respondent held the office of city judge of the city of San Bruno in San Mateo County. The city of San Bruno is a city of the sixth class, organized pursuant to the provisions of sections 850 et seq., of the Municipal Corporations Act (Deering's General Laws, Act 5233).
 The complaint alleged that on May 14, 1924, the city council of said city appointed the defendant as city judge of said city, and thereafter he took possession of said office and ever since has been and now is in control of said office; that on May 25, 1937, said city council appointed the defendant as city attorney of said city, and thereafter he took possession of said office and ever since has been and now is in control of said office.
 The prayer of the complaint was for judgment that said defendant is not entitled to the office of city judge and that he be ousted and excluded therefrom.
 To said complaint the defendant interposed a general demurrer which the trial court sustained without leave to amend, and thereupon entered judgment dismissing said action.
 Appellant contends that the positions of city attorney and city judge of a city of the sixth class are incompatible and that one person cannot fully perform the duties of both positions at the same time without giving rise to such incompatibility as must operate to vacate the first position held. Respondent contends that a city attorney of a city of the sixth class is not a public officer, and even if he were such officer, the duties imposed upon him by statute are not such as to *638 conflict with his duties as city judge and that there is no incompatibility between the two offices.
 Authority for the appointment of a city attorney of a city of the sixth class is contained in section 852 of the Municipal Corporations Act (Deering's General Laws, Act 5233), wherein a city council is authorized to appoint "a city attorney ... and such other subordinate officers or employees as in its judgment may be deemed necessary". The compensation of such city attorney may be fixed from time to time by the city council by resolution or ordinance and he shall hold office during the pleasure of said city council. Section 879 of said Municipal Corporations Act prescribes the duties to be performed by such city attorney as follows: "It shall be the duty of the city attorney to advise the city authorities and officers in all legal matters pertaining to the business of said city, to frame all ordinances and resolutions required by the city council, and perform such other legal services as said city council may require from time to time ..."
 Other statutory provisions confer the following additional duties upon a city attorney of a city of the sixth class: To approve all bonds, notes and warrants which are to secure city deposits (Act 2834a, section 4, Deering's General Laws); to defend all suits for damages brought against any officer of the city on account of injuries to person or property resulting from the negligence and carelessness of such officer or from the dangerous or defective condition of any public streets, highways, buildings, parks, grounds, or works due to such officer's negligence or carelessness (Act 5150, section 2, Deering's General Laws); to defend the city in any suit for damages brought against the city on account of injuries to person or property alleged to have been received as a result of the dangerous or defective condition of any public streets, highways, buildings, parks, grounds, works or property (Act 5154, section 2, Deering's General Laws); and to abate public nuisances (section 731 of the Code of Civil Procedure).
 While there is no specific provision in the statutes requiring a city attorney to take an oath of office, section 853 of the Municipal Corporations Act provides: "Every officer of such city, before entering upon the duties of his office, shall take and file with the city clerk the oath of office required by the Constitution and the laws of the State." *639
 [1] In view of the statutory provisions creating the position of city attorney in cities of the sixth class and conferring upon such attorney the duties and responsibilities hereinabove specified, it would seem to be in harmony with the policy of this State as declared in its constitutional and statutory provisions to require that a city attorney of a city of the sixth class should take the oath required by the Constitution and laws of this State in accordance with the above-quoted provision of section 853 of the Municipal Corporations Act.
 [2] While it is true that the compensation and term of office of a city attorney of a city of the sixth class is fixed by the city council of such city, it is equally true that the duties of such attorney as prescribed by statute pertain to the public and are continuing and permanent, and we think it is clear that the office of city attorney of a city of the sixth class falls well within the definition of the term "public office" as defined by this court in the leading case of Patton v. Board of Health, 127 Cal. 388 [59 P. 702], wherein this court said:
 [3] "It seems to be reasonably well settled that where the legislature creates the position, prescribes the duties, and fixes the compensation, and these duties pertain to the public and are continuing and permanent, not occasional or temporary, such position or employment is an office and he who occupies it is an officer. In such a case, there is an unmistakable declaration by the legislature that some portion, great or small, of the sovereign functions of government are to be exercised for the benefit of the public, and the legislature has decided for itself that the employment is of sufficient dignity and importance to be deemed to be an office."
 In the case of Leymel v. Johnson, 105 Cal.App. 694 [288 P. 858], the District Court of Appeal quoted with approval from volume 21, California Jurisprudence, pages 819 and 820, as follows:
 " 'The words "public office" are used in so many senses that the courts have affirmed that it is hardly possible to undertake a precise definition which will adequately and effectively cover every situation. Definitions and application of this phrase depend, not upon how the particular office in question may be designated nor upon what a statute may name it, but upon the power granted and wielded, the duties and functions performed, and other circumstances which manifest the *640 nature of the position and mark its character, irrespective of any formal designation. But so far as definition has been attempted, a public office is said to be the right, authority, and duty, created and conferred by law--the tenure of which is not transient, occasional, or incidental--by which for a given period an individual is invested with power to perform a public function for public benefit."
 " 'The individual who occupies such an office is a public officer. He is a public agent and as such acts only on behalf of his principal, the public, whose sanction is generally considered as necessary to give to acts performed by the officer the authority and power of a public act or law. An "incumbent" is one who is in the present possession of an office. The terms "officer" and "office" are paronymous, and in their original and proper sense are to be regarded as strictly correlative. They may be used in a sense other than the proper one, but the presumption is, unless the contrary appears, that the proper sense was intended."
 " 'Of the various characteristics attached to public office by definition, some are regarded as indispensable, and others, while not in themselves conclusive, are yet said to indicate more or less strongly the legislative intent to create or not to create an office. One of the prime requisites is that the office be created by the Constitution or authorized by some statute. And it is essential that the incumbent be clothed with a part of the sovereignty of the state to be exercised in the interest of the public.' "
 [4] We see nothing in the above-quoted excerpts which can be said to be repugnant to a pronouncement that a city attorney of a city of the sixth class is a public officer occupying a public office under the law of this State, and we are of the opinion that he is such public officer invested with all the rights and privileges and subject to all of the limitations and restrictions imposed by the Constitution and laws of this State and considerations of public policy.
 Turning then to the question as to whether or not the positions of city judge and city attorney of a city of the sixth class are incompatible and cannot be held by one person at the same time, our attention is directed to section 882 of the Municipal Corporations Act (Deering's General Laws, Act 5233), which provides in substance that a city court is established in said city, to be held by a city judge, which in cities *641 having a population of less than 30,000 shall have the same jurisdiction as a justice's court of a Class B in all civil and criminal actions arising within the corporate limits of such city and which might be tried in such a justice's court, and that such city court may also exercise the jurisdiction of a court of small claims in the same manner as provided by law for the exercise of similar jurisdiction by justices of the peace.
 Turning to subdivision 2 of section 112 of the Code of Civil Procedure we find that justices' courts of Class B have original jurisdiction in all cases at law in which the demand exclusive of interest or the value of the property in controversy, amounts to $300 or less, except cases at law which involve the title or possession of real estate, or the legality of any tax, impost, assessment, toll or municipal fine.
 It is conceded by both parties to this action that there is no statutory inhibition against the holding of both of the offices here in question by one person at the same time and that the impediment to such holding must be predicated upon the common law doctrine of public policy which is well recognized as the foundation for many decisions of the courts of this State. This policy and the rule which developed therefrom was given attention in the case of People v. Garrett, 72 Cal.App. 452 [237 P. 829], where the court said:
 "The doctrine arising from attempts by single individuals to exercise the functions of incompatible offices springs out of considerations of public policy ..., such considerations arising naturally from the view that two offices cannot be held by one person when, from the divergent character of the offices, the public interest will suffer thereby." And at page 457:
 "The relationship between offices which will lead to a judicial determination that they are incompatible and cannot therefore be held by one person will always appear when, to quote from a standard textbook, 'the nature and duties of the two offices are such as to render it improper, from consideration of public policy, for one incumbent to retain both.' (Dillon on Municipal Corporations, 5th ed., sec. 419.)" Section 469 of Volume 2 of McQuillin on Municipal Corporations says:
 "Two offices are said to be incompatible when the holder cannot in every instance discharge the duties of each. Incompatibility *642 arises, therefore, from the nature of the duties of the offices, when there is an inconsistency in the functions of the two, where the functions of the two are inherently inconsistent or repugnant, as where antagonism would result in the attempt by one person to discharge the duties of both offices, or where the nature and duties of the two offices are such as to render it improper from considerations of public policy for one person to retain both. The true test is whether the two offices are incompatible in their natures, in the rights, duties or obligations connected with or flowing from them." In 46 Corpus Juris 941, it is said:
 "At common law the holding of one office does not of itself disqualify the incumbent from holding another office at the same time, provided there is no inconsistency in the functions of the two offices in question. But where the functions of two offices are inconsistent, they are regarded as incompatible. The inconsistency, which at common law makes offices incompatible, does not consist in the physical impossibility to discharge the duties of both offices, but lies rather in a conflict of interest, as where one is subordinate to the other and subject in some degree to the supervisory power of its incumbent, or where the incumbent of one of the offices has the power to remove the incumbent of the other or to audit the accounts of the other." In State v. Jones, 130 Wis. 572 [110 N.W. 431, 118 Am.St.Rep. 1042, 10 Ann. Cas. 696, 8 L.R.A. (N. S.) 1107], the court said:
 "It is not an essential element of incompatibility at common law that the clash of duty should exist in all or in the greater part of the official functions. If one office is superior to the other in some of its principal or important duties, so that the exercise of such duties might conflict, to the public detriment, with the exercise of other important duties in the subordinate office, then the offices are incompatible." The offices of city judge and city attorney were declared to be incompatible by the Wisconsin Supreme Court in State v. Hines, 194 Wis. 34 [215 N.W. 447], and the court in that case said, at page 448:
 "In the instant case, the appellant attempted to hold two incompatible offices, contrary to public policy. He was at liberty to resign his office as municipal judge and accept the office of city attorney. He did not resign, but under the common law rule, he created a vacancy in the office of judge by accepting the incompatible office of city attorney." *643
 [4] Respondent contends that since section 880 of the Municipal Corporations Act provides that it is the duty of the chief of police "to prosecute before the city court, all breaches or violations of or non- compliance with any ordinances which shall come to his knowledge", there is no requirement that the city attorney should appear before the city court in connection with prosecutions which might arise under any of the city ordinances. We are not impressed with this contention, as we think it places an altogether too narrow construction upon the statutes prescribing the duties of the city attorney. It is our view that this provision does not deprive a city attorney of a city of the sixth class of the right and duty to carry on the legal proceedings pertaining to the prosecution of an action based upon the violation of a city ordinance. The intention of the legislature in the enactment of section 880 of the Municipal Corporations Act was obviously to bestow upon the chief of police of such city the duty to institute prosecutions for breaches or violations of or non-compliance with city ordinances which shall come to his knowledge, but in the event such prosecutions result in the trial of cases, the duty should devolve upon the city attorney to conduct such trials as the officer of the city qualified for the performance of such duties.
 [5] In the various statutes to which we have referred herein as specifying the duties which a city attorney of cities of the sixth class is required to perform, it is obvious that he may be required from time to time to appear before the city judge and prosecute or defend actions to which the city is a party. Many cities of the sixth class now own their own utilities such as water and electricity, and quite often it is necessary for such city to institute proceedings for the collection of claims for water and electricity furnished their patrons. Such actions could properly be brought in the city court, and the city attorney would, of course, represent the city. It is obvious that he could not do so if he were also city judge. As was declared by the Supreme Court of Maine in the case of Howard v. Harrington, 114 Me. 443 [96 Atl. 769, L.R.A. 1917A, 211]: "He cannot be both prosecutor and judge. The duties are repugnant. He can only perform the duties of one office by neglecting to perform the duties of the other. It is not for him to say in a particular instance which he will perform and which he will not. The public has a right to know with certainty. *644 Stubbs v. Lee, supra [64 Me. 195 (18 Am. Rep. 251).] Thence [sic.] it is that two such offices must be held to be incompatible."
 [6] The two offices in question being incompatible, it follows that when the respondent accepted the office of city attorney, said acceptance had the effect of vacating or terminating his right to hold the office of city judge. As was said in People v. Garrett, supra: "The rule is settled with unanimity that where an individual is an incumbent of a public office and, during such incumbency, is appointed or elected to another public office and enters upon the duties of the latter, the first office becomes at once vacant if the two are incompatible (Mechem on Public Officers, sec. 419; 22 R. C. L., sec. 63) ..."
 McQuillin on Municipal Corporations, second edition, volume 2, section 469, thus states the rule: "The common law rule is that the acceptance by a public officer of another office which is incompatible with the first thereby vacates the first office; that is, the mere acceptance of the second incompatible office per se terminates the first office as effectively as a resignation."
 [7] It appearing from what we have said in the foregoing opinion that respondent was at the time of the commencement of this action unlawfully holding the office of city judge of the city of San Bruno, the present proceeding in quo warranto was the proper method of challenging his right thereto, and the complaint on behalf of appellant alleged sufficient facts to constitute a cause of action, and defendant's demurrer thereto should have been overruled.
 The judgment is reversed with directions to the trial court to overrule the demurrer and proceed with the disposition of the cause in accordance with the views herein expressed.
 Shenk, J., Curtis, J., Edmonds, J., and Gibson, C.J., concurred.
