The plaintiff in error, Charles A. Schenerlein, filed a petition for mandamus in the Circuit Court of Ohio County, against the defendants in error, the City of Wheeling, a municipal corporation and August L. Dailer, City Clerk of said City of Wheeling, praying that a peremptory writ of mandamus be issued by said Circuit Court requiring the defendants in error to place his name on the ballot as a candidate for councilman from the fourth ward of said city, to be voted on in the city election to be held on June 2, 1959. The petition filed in the Circuit Court alleged that the plaintiff in error was a qualified voter in said City of Wheeling and is registered to vote in precinct 67 of the fourth ward, had been a resident of the fourth ward for more than 60 days and a bona fide resident of the State of West Virginia for more than 1 year next preceding the institution of this proceeding, and that he was therefore eligible to become a candidate for councilman for the City of Wheeling. It also alleged that he had been nominated by petition signed by a requisite number of qualified voters- of his ward and *436properly filed, that he accepted said nomination and paid the required fees, all of which was done in accordance with the provisions of the city charter of the City of Wheeling, and therefore was entitled to have his name placed on the official ballot for said election.
An answer was filed by the defendants in error admitting all of the allegations contained in the petition except residency in the City of Wheeling or the fourth ward thereof, and denying he was a qualified voter in said city and eligible to be a member of the city council. No demurrer was filed to the answer.
When the proceeding came on for hearing before the Circuit Court of Ohio county on April 13, 1959, that Court directed that evidence be taken on the question of residence. The hearing indicated that after the nomination of the petitioner, acceptance thereof and payment of the required fees by him, the city clerk requested that an investigation or inquiry be made by the city attorney as to his eligibility or qualifications to be a candidate for councilman for the fourth ward. By letter dated April 8, 1959, the city clerk advised petitioner that pursuant to a ruling of the city solicitor he was not a bona fide resident of the City of Wheeling, and that he could not include his name on the ballot as a candidate for councilman for the City of Wheeling to be voted on at an election to be held on June 2, 1959. After the hearing, by order entered on April 18, 1959, the Circuit Court denied the writ and dismissed the petition on the grounds that petitioner was not a bona fide resident of the City of Wheeling.
When the application was made in this Court for a writ of error to the judgment of the Circuit Court, counsel for the plaintiff in error filed a brief in support of the application for a writ of error and orally presented same. The brief merely cited authority to support the contention that the petitioner, Charles A. Schenerlein, was a resident of the fourth ward of the City of Wheeling, but in the oral presentation counsel not only pre*437sented the question of residency, but stated that the city clerk had no power or authority to refuse to place petitioner’s name on the ballot as a candidate for councilman in the city election to be voted on by the people, and that his eligibility or qualifications could be determined later in accordance with prior decisions of this Court.
A writ of error was granted by this Court on April 27, 1959, and leave having been granted to move to reverse the judgment of the Circuit Court in this case, a hearing was set on May 5, 1959. The case was submitted to this Court upon a joint stipulation in writing by counsel, waiving certain requirements of the statute and rules of this Court on the motion to reverse the judgment of the Circuit Court and upon briefs filed by counsel for both parties. No oral argument was made.
On the 12th day of May, 1959, this Court entered an order sustaining the motion to reverse the judgment of the Circuit Court of Ohio County rendered on the 18th day of April, 1959, and directing the Circuit Court to award the peremptory writ of mandamus requiring defendants in error to place the name of the petitioner, Charles A. Schenerlein, on the official ballot to be used in the city election to be held on June 2, 1959.
The city clerk had no power or authority to refuse to place the petitioner’s name on the ballot. He should not have inquired into his eligibility or qualifications as he has no jurisdiction to do so and should have placed the name of petitioner on the ballot as requested. When the petition for a writ of mandamus was filed in the Circuit Court of Ohio County, that Court should have taken notice on its own motion of the lack of jurisdiction of the city clerk in this instance and should have issued a peremptory writ of mandamus requiring the city clerk to place the petitioner’s name on the ballot. Mandamus lies to require a public official to discharge a nondiscre-tionary duty. Glover v. Sims, 121 W. Va. 407, 3 S. E. 2d 612; State v. Sims, 129 W. Va. 694, 41 S. E. 506. The *438matter of his eligibility or qualifications, if it was desired to question same, should have been left for disposition until a later date. This matter has been passed on by this Court in prior decided cases. In the case of McKnight v. Ballot Commissioners, 86 W. Va. 496, 498, 103 S. E. 399, a quite similar situation to the case at bar was presented. It was contended that the petitioner was not eligible to have his name placed on the ballot in the primary election of Wetzel County because he had moved from the county, and it was shown that the petitioner had for many years resided in Wetzel County; that in 1918 he was employed by the state and that such employment required his presence in Kanawha County; that in 1919 he removed his family from Wetzel County to the City of Huntington where his children attended school, but that he always claimed his residence in the County of Wetzel and voted in said County. It was insisted by the petitioner that the ballot commissioners had no power to determine his eligibility; that he having filed the certificate in the form required by law, it was the duty of the commissioners to place his name on the ballot without undertaking to enter upon an inquiry as to whether or not he was legally qualified to hold the office. It was held in that case that “There is no authority conferred by law upon a board of ballot commissioners to try the question of the eligibility of candidates. To hold that such a board possesses this power would be to bring into existence many controversies and contests for which there would never be a reason if this question is left for determination by competent authority after the election.”
Another case decided by this Court dealing with this matter is Harwood v. Board of Ballot Commissioners, 137 W. Va. 52, 70 S. E. 2d 24. The Court, in this case, not only approved the McKnight case, but in deciding the case used the syllabus of the same, in which the following language appears: “When a candidate for nomination in a primary election files a certificate with the clerk of the circuit court, from which it appears that he is eligible to hold the office for which he is a candidate, the *439board of ballot commissioners have no authority to institute an inquiry for the purpose of determining the question of his legal qualifications to hold such office. The duty of said board is to place his name upon the ballot and allow the question of his eligibility to be determined by a competent tribunal, should he be elected thereto.” It is true that the McKnight and Harwood cases involve the county court as ballot commissioners, but the city council or the city clerk in the case at bar has a similar position as ballot commissioner in a city election. This was so held in the case of Lockhart v. Rogers, 134 W. Va. 470, 478, 61 S. E. 2d 258. This case also followed the principle that eligibility of candidates cannot be inquired into by the city council or city clerk. The answers by respondents in the Lockhart case claimed that the petitioners were not eligible for the office of councilmen because they .did not own property in the City of Welch. This Court, in that case, with regard to this question, indicated that such matter should be taken up at another time by stating: “We express no opinion as to the eligibility of petitioners, Belcher, Smith and Capehart.”
The city clerk, as heretofore stated, had no power, authority or jurisdiction to refuse to place the name of the petitioner, or plaintiff in error, on the ballot to be voted on in the city election to be held on June 2, 1959. Such refusal was an illegal or unlawful act on his part. It has been held that mandamus will not lie to compel the performance of an illegal or unlawful act. 12 Michie’s Jurisprudence, Mandamus, §3; Huntington v. Heffley, 127 W. Va. 254, 32 S. E. 2d 456; Pardue v. County Court, 105 W. Va. 235, 141 S. E. 874. Therefore, it follows that it should not be refused in a case in which the use of the writ is proper when the effect of such refusal is to permit the doing of an illegal or unlawful act. In the case at bar, the effect of the refusal on the part of the Circuit Court of Ohio County to issue the peremptory writ of mandamus directing the city clerk to place the petitioner’s name on the ballot was in effect permitting him to do something which he had no legal *440right to do and which clearly was done without authority or jurisdiction, both in the investigation conducted as to petitioner's eligibility and in refusing to place his name on the ballot.
As stated above, the question of lack of authority or jurisdiction on the part of the city clerk was called to this Court’s attention when the petition for writ of error to the judgment of the Circuit Court was presented. Even if this had not been done, this Court by its own motion may take notice of such matter. State ex rel. Hammond v. Worrell, 144 W. Va. 83, 106 S. E. 2d 521, 525. In the Hammond case, this Court stated: “Lack of jurisdiction may be raised for the first time in this Court, and the Court of its own motion may take notice there.” The lack of jurisdiction of the city clerk does not deprive the circuit court of jurisdiction in a case of this kind and this was so held in- the case of Adams v. Londeree, 139 W. Va. 748, 83 S. E. 2d 127, but in the case at bar, the writ should not be refused by a court of competent jurisdiction which would in effect permit or allow said clerk to do something that he has no authority or jurisdiction to do. In the case of Adams v. Londeree, supra, the city clerk had already placed the name of Londeree on the ballot as a candidate for mayor and had performed his proper duty under the law, and the writ was refused by this Court, after stating that it had jurisdiction, on the grounds that the defendant, Lon-deree, was qualified to hold the office for which he had been nominated.
For the foregoing reasons, the motion to reverse the judgment of the Circuit Court of Ohio County refusing to award the peremptory writ of mandamus is sustained and the judgment of the Circuit Court of Ohio County is reversed; the case is remanded to that Court with directions to award the peremptory writ of mandamus as prayed for in the petition directing defendants in error to place the name of petitioner, Charles A. Schener-lein, on the ballot of the City of Wheeling as a candidate *441for councilman for the fourth ward at the election to be held on June 2, 1959.
Reversed and remanded, with directions.