
210 S.E.2d 485 (1974)
Julia Ann CIMINO
v.
The BOARD OF EDUCATION OF the COUNTY OF MARION, a Statutory Corporation, and T. J. Pearse, Marion County Superintendent of Schools.
No. 13421.
Supreme Court of Appeals of West Virginia.
December 20, 1974.
*487 Ross Maruka, Fairmont, for appellant.
Frank C. Mascara, Fairmont, for appellee.
*486 SPROUSE, Justice:
This is an appeal by Julia Ann Cimino from the final judgment of the Circuit Court of Marion County in a declaratory judgment action instituted by her as the plaintiff, against The Board of Education of Marion County and T. J. Pearse, Superintendent of Schools of Marion County, as the defendants. The plaintiff's employment had been terminated by the board and she brought this action to have the termination declared unlawful. The circuit court held that the plaintiff could not be lawfully employed as a cook by the defendant board of education because her husband had been elected a member of that board.
The plaintiff was employed continuously by the defendant board of education as a cook at East Park Elementary School in Fairmont for every school year from 1966 through 1973. Her husband was elected a member of the defendant Marion County Board of Education and began serving in that capacity on January 2, 1973.
The written contract between the plaintiff and the defendant school board, dated July 1, 1972, contained a clause relating to the rights of the employee upon termination or nonrenewal of the contract. That clause, embodying the provisions of Code, 1931, 18A-2-6, as amended, stated that after three years of acceptable employment the employee was entitled to be notified in writing, on or before the first day in May in any year in which the employee's employment was to terminate, in the event the employee was not to be reemployed for the ensuing year.
The plaintiff did not receive the required written notice on or before the first day in May, 1973. She did, however, receive a day-letter, dated July 10, 1973, from the Superintendent of Schools, T. J. Pearse, advising her that she could not legally be employed as a cook.
Pearse advised the plaintiff that a State tax auditor had informed him that her continued employment would be a violation of Code, 1931, 61-10-15, as amended, and that the auditor's opinion had been confirmed by the State Department of Education. Pearse indicated that plaintiff's services as a cook had been completely satisfactory and that she would have been reemployed had the board not been advised it would be illegal to do so. The plaintiff was not employed at the meeting of the Marion County Board of Education held on July 31, 1973, to employ cooks and other nonprofessional personnel for the year 1973-74.
There are two issues presented on this appeal. The first is whether the provisions of Code, 1931, 61-10-15, as amended, prohibiting a member of the board of education from entering into a contract in which he has a pecuniary interest, prohibits the entire board of education from approving the employment contract of a nonprofessional employee who is a wife of one of the members of the board. Necessarily ancillary to that issue is whether such prohibition voids the contract rights of the board *488 member's wife. The second issue is whether Code, 1931, 61-10-15, as amended, violates the Equal Protection Clause of the Fourteenth Amendment of the United States Constitution. Appellant raises this objection because by that section board members may employ relatives who are professional personnel, but not relatives who are nonprofessional personnel.
Chapter 61, Article 10, Section 15, Code of West Virginia, 1931, as amended, provides:
"It shall be unlawful for * * * any member of any * * * county * * board, or for any county or district officer to be or become pecuniarily interested, directly or indirectly, in the proceeds of any contract or service, or in furnishing any supplies in the contract for, or the awarding or letting of, which as such member * * * he may have any voice, influence or control: Provided, however, that nothing herein shall be construed to prevent or make unlawful the employment of the spouse of any such member, * * * as principal or teacher in the public schools of any county, * * *."
Code, 1931, 61-10-15, as amended, is an enactment of the public policy, expressed in the statutes of many states, which prohibits public officers from contracting with a public agency which they represent or from having a private interest in its contracts. 63 Am.Jur.2d, Public Officers and Employees, Section 312, pages 815-16. See also 68 Am.Jur.2d, Schools, Section 139, page 471, wherein it is stated:
"In agreement with the elementary principle that a member of a school board may not enter into a contract with the board in which he has a personal interest, a school board cannot contract with one of its own members to teach the school * * *.
"Antinepotism statutes exist in many states. Under such statutes provision is generally made prohibiting the appointment of a person as a public employee or teacher who bears a designated relationship of consanguinity or affinity to one who is a member of the appointing authority. In some instances, employment of such a relative of a member of a school board is permissible, provided the related member of the school board does not vote for or participate in the making of the employment contract. But under the terms of some such statute, such contracts are prohibited whether or not the related school board member has voted for or participated in the making of the contract."
The question whether Code, 61-10-15 prohibits only the member having the specific interest from voting on a contract or whether it prohibits an entire board from voting on a matter in which one member has an interest was previously considered and determined by this Court in Haislip v. White, 124 W.Va. 633, 22 S.E.2d 361, and Hunt v. Allen, 131 W.Va. 627, 53 S.E.2d 509. In Haislip, we held that a member of a county board of education, who voted for the appointment of his wife as an employee of the board, should be removed from office. We held in Haislip, however, that one of the board members who voted for the employment of the wives of two other board members was not subject to removal. Removal of the third member was sought for official misconduct for employing an incompetent or disqualified person. The Court in Haislip, finding no evidence of incompetence or disqualification of the wives of the other board members, held that the third member was not guilty of "such misconduct in office as [justifies] his removal."
However, in Hunt v. Allen, supra, we specifically held that all members of a school board are subject to removal from office who voted on a contract even though it only inured to the pecuniary benefit of one board member.
In commenting on the culpability of the member of the board who was principally involved, this court said:

*489 "As to the third question involving whether or not the contracts of Hunt were corrupt and involved moral wrongdoing, we believe the simple answer is that this conduct was unlawful because forbidden by statute or was malum prohibitum as distinguished from malum in se. Membership of a board of education is a matter of high public trust * * *. It [Code, 61-10-15] recognizes as a matter of public policy that a pecuniary interest might, and in many instances would, subject members of boards of education to harmful suspicion of corruption and that in some instances there would be created a borderland where the distinction between honesty and corruption would not be pronounced. * * *" Hunt v. Allen, supra at 635, 53 S.E.2d at 514.
In speaking of the other four members of the board (not directly involved with the pecuniary interest), the Court said:
"* * * An examination of the petition in this matter, plainly shows that the other four members of the Board of Education of Roane County are not accused of having violated the terms of Code, 61-10-15, but are accused of official misconduct in that they knowingly approved the violation of that section by Hunt. We think this record shows quite plainly that the other four members of the board by the allowance of Hunt's statements which showed on their face the merchandise furnished by him, the school to which it was supplied and the fact that it came from Opie Hunt's place of business, knowingly aproved the commission of a misdemeanor. * * *" Hunt v. Allen, supra at 636, 53 S.E.2d at 515.
There was no attempt, of course, in this proceeding to remove any member of the Marion County Board of Education. To the contrary, it was to avoid such possible action that the members of the board and the school superintendent declined to renew the plaintiff's contract. The question whether the board members would be subject to removal for voting on such a contract, however, was presented to the trial court, and it properly held that the members of the board would be subject to removal if the plaintiff's employment was not terminated.
The ultimate question in this case is, however, whether the plaintiff's contractual rights became void upon her husband's election to the Marion County Board of Education. We think that they did. In both Haislip and Hunt, this Court expressed in strong language that Code, 61-10-15, embodied an expression of the public policy of this State. It is clear that any contract in violation of this provision is void.
In 17 Am.Jur.2d, Contracts, Section 165, page 521, the following statement appears: "The well-established general rule is that an agreement which violates a provision of * * * a * * * constitution, or of a constitutional statute, or which cannot be performed without violating such provision, is illegal and void." Similarly, section 458 of the Restatement of Contracts provides:
"A contractual duty or a duty to make compensation is discharged, in the absence of circumstances showing either a contrary intention or contributing fault on the part of the person subject to the duty, where performance is subsequently prevented or prohibited
"(a) By the Constitution or a statute of the United States, or any one of the United States whose law determines the validity and effect of the contract, or by a municipal regulation enacted with constitutional or statutory authority of such a State, * * *."
These principles firmly establish that a contract which is valid and binding at the time of execution may be rendered void by the subsequent enactment of a statute prohibiting performance of the contract. 17 Am.Jur.2d, Contracts, Section 171, page 529. We believe these same principles are applicable to this situation in which the performance of a contract, legal in its inception, subsequently becomes contrary *490 to public policy and illegal because a change in circumstance brings the contract within the prohibitory provisions of an existing statute. Consequently, while Mrs. Cimino's contract with the board of education was legal and binding until the time her husband was elected to the board of education, his election triggered the effect of Code, 61-10-15, and made her contractual rights void from that date.
We realize this action in some aspects seems harsh, particularly in view of Mrs. Cimino's previous satisfactory employment with the school board. We must, however, assume that Mr. and Mrs. Cimino were aware of the provisions of the law at the time he became a candidate for this public office. As worthy as public service in this capacity is, we think it clear that the Legislature and this Court, in interpreting Code, 61-10-15, intended to remove from this important office any possibility of abuse.
The plaintiff contends that Code, 61-10-15, violates the Equal Protection Clause of the Fourteenth Amendment of the Constitution of the United States. This contention is based on the fact that, as amended, the statute specifically exempts from its prohibition persons employed as teachers or principals. We find no merit in this contention.
Whether a statute or governmental action violates the Equal Protection Clause is a determination made by the application of one of two constitutional tests. The more demanding test relates to statutes which impinge upon sensitive and fundamental rights and constitutional freedoms, such as religion and speech. In order to uphold such a statute, a reviewing court must find that a compelling state interest is served by the classification. Weber v. Aetna Casualty & Surety Company, 406 U.S. 164, 92 S.Ct. 1400, 31 L.Ed.2d 768; Shapiro v. Thompson, 394 U.S. 618, 89 S.Ct. 1322, 22 L.Ed.2d 600.
In all other instances, the constitutionality of a statute, challenged under the Equal Protection Clause, is subject to the traditional standard requiring that the state law be shown to bear some rational relationship to legitimate state purposes. San Antonio Independent School District v. Rodriguez, 411 U.S. 1, 93 S.Ct. 1278, 36 L.Ed.2d 16. Under this test, the court must consider whether the classification is a rational one based on social, economic, historic or geographical factors; whether the classification bears a reasonable relationship to a proper governmental purpose; and whether all persons within the classes established are treated equally.
The categorization of teachers and other professional personnel into a single class, which excludes nonprofessional personnel, is a rational classification. The Legislature in amending Code, 61-10-15, to exclude teachers and other professional personnel from its operation declared a governmental purpose based on proper social and economic conditions. We cannot say that this classification does not bear a reasonable relationship to a legitimate governmental purpose, nor can we say that this exclusion violates the Equal Protection Clause of the Fourteenth Amendment of the United States.
The plaintiff also contends that this exemption of principals and teachers violates the constitutional provisions of Section 39 of Article VI of the West Virginia Constitution against special legislation. Constitutional prohibitions against special legislation, however, do not prohibit classification but they require that such classification be natural, reasonable and appropriate. State ex rel. Appalachian Power Company v. Gainer, 149 W.Va. 740, 143 S.E.2d 351; Martins Ex'ers. v. Commonwealth, 126 Va. 603, 102 S.E. 77. These considerations are similar to those required by traditional Equal Protection standards. Having determined that the classification made by Code, 61-10-15, is both rational and reasonable in its relation to governmental purpose, we hold that that section does not violate Section *491 39 of Article VI of the Constitution of West Virginia.
For the above reasons, the judgment of the Circuit Court of Marion County is affirmed.
Affirmed.
NEELY, J., deeming himself disqualified, did not participate in this decision.
