delivered the opinion of the court.
The objection that this court is precluded from issuing a mandamus in this case, because the County Court has the right to decide who is elected judge of the Buchanan Court of Common Pleas, is not tenable. The act establishing the Court of Common Pleas provides that ‘‘when two or more persons shall receive an equal number of votes for said office, and more than any other person, the County Court'of said county shall decide which one of them shall hold the same ; and whenever there shall be a contested election, the said county shall decide the same.” The act further provides that “when said officer shall be elected, or decided by the County Court to be entitled, to said office, the justices of said court shall make out a commission, signed by them or a majority of them, attested by the clerk of said court under his seal of office, who shall immediately deliver the same to the person thus chosen. (Sess. Acts 1853, p. 78.) By the foregoing provisions the functions of the County Court are in the first instance ministerial, though their judicial action may be evoked on the happening of a certain contingency. The words “ or decided by said County Court to be entitled to said office” have reference to a case where a contest has been had, or where *349two persons have received the same number of votes, and it becomes necessary for the court to determine which shall hold and occupy the office. Where there is but one candidate, or the certificate of the clerk shows that a candidate has received a majority of the votes, and is elected at a regular election, and there is no contest, nothing remains for the County Court to do but to issue the commission. They are, then, invested with no discretion, and have no judicial functions to perform. The case of The State ex rel. Bartley v. Fletcher (39 Mo. 388) is not parallel with this. There it was decided that the duty of the governor to issue a commission was a political power delegated by the constitution, not subject to revision in the courts ; and that the executive, being a co-ordinate branch of the government, was not amenable to the judiciary -when exercising his admitted authority.
The case is quite different here. The County Court is an inferior tribunal, over which, by the constitution and laws of the State, this court has supervisory control, and can compel it to act when it refuses to perform or proceed in the execution of a plain duty enjoined on it by law. Were this the only question in the record, the writ necessarily would have to be issued.
But the petition shows, and the fact is admitted, that the registration law was not complied with previous to the election. No new or supplementary registration was had whatever. The election was only for a judge of the Court of Common Pleas, and was a special as distinguished from a general election, within the meaning of the statute. But whether general or special, the result is the same, as it is a positive requirement that registration should precede the election. The act declares that the election for judge of the Court of Common Pleas shall be conducted in all respects in the same manner as may be provided by law for the election of members of the Legislature.' It is obvious that there could be no valid election for a member of the Legislature without a prior registration. (Sess. Acts 1868, p. 131.)
This court will not issue a peremptory writ of mandamus unless the relator shows that he has a good title or a perfect right to the remedy he demands. He can derive no right from an illegal or invalid election.
*350There is force in the observation of the petitioner’s counsel that if the registration officers refuse to perform their duty-injustice may be done, and a party may be deprived of what he is fairly entitled to. But that would not justify a court in giving validity to a palpably illegal act, though the illegality occurred in consequence of the negligence, willful default, or even corruption of officers whose duty it was to perform a given function or execute a trust. The party aggrieved can not seek his redress in this manner.
This controversy has grown out of a difference of opinion entertained as to the tenure of the office of Common Pleas judge for Buchanan county. The question as to when the term commences and ends is not raised in the issue presented by the pleadings, and we can therefore give no decision upon it. The act establishing the court requires the election to take place in August. Whether that act has been modified or amended, so as 'to prescribe a different term, we do not know, as nothing has been presented on the subject.
For the reason that the requirements of the law as to registration were wholly neglected, the demurrer will be sustained.
The other judges concur.