This action seeks to compel the defendants to authorize the payment of legal expenses incurred by plaintiff in his successful defense of an election contest. Both parties have filed motions for summary judgment on the issue of whether the City of Atlantic City must pay the legal expenses of plaintiff.
Plaintiff is the former mayor of Atlantic City, New Jersey and was serving in that capacity when the election contest was filed. The contest consisted of three separate suits, which were consolidated for trial. The first suit alleged malconduct, fraud, mismanagement, and negligence; the second alleged violations of New Jersey campaign laws; and the third alleged violations of New Jersey election laws and specifically challenged the right of plaintiff to simultaneously hold the offices of mayor of Atlantic City and assemblyman of the State of New Jersey. After a trial lasting in excess of four months, judgment was entered in favor of plaintiff in all three actions.
*148Plaintiff was represented in the prior actions by Richard Alten, Esquire. Alten is an attorney in the Atlantic City area engaged in private practice and unaffiliated with the Atlantic City solicitor’s office. Plaintiff claims that he was required to retain private counsel due to the inability of the solicitor’s office to provide adequate representation at trial. An affidavit submitted by Matthew H. Powals, City Solicitor of Atlantic City supports plaintiff's contention. Subsequent to the conclusion of the trial, Alten submitted to plaintiff a bill in the amount of $80,710.27 representing costs and attorney’s fees. Plaintiff then requested the city council of Atlantic City to authorize payment. City council refused to authorize any payment whatsoever whereupon plaintiff initiated this lawsuit.
In the present case plaintiff is not seeking to enforce an action already taken by defendants but instead is seeking relief in the nature of mandamus to compel them to take action which plaintiff deems nondiscretionary; that is, payment of plaintiff’s legal expenses. The determination of whether plaintiff is entitled to the relief requested requires the resolution of two issues; the first being whether defendants could have authorized payment of plaintiff’s counsel fees, and the second being whether defendants could be compelled to authorize said payment.
In support of the present motion, plaintiff relies on New Jersey case law, Federal and State Equal Protection provisions, and public policy considerations. For the reasons which follow, however, all of plaintiff’s arguments must fail.
The rule in New Jersey is that a municipality has the authority to contract with private individuals for the performance of services which the municipality itself may render. N.J.S.A. 40:48-5. Thus, the first issue is narrowed to whether the office of the city solicitor could have defended the plaintiff in the election contest if it had had sufficient resources at the time. The defense of these actions by the solicitor would have obviously required the expenditure of public funds, on the *149plaintiff’s behalf. Such action by the solicitor is only allowed where the defense of the suit constitutes a public purpose. Roe v. Kervick, 42 N.J. 191, 207 (1964). In Roe, supra, the New Jersey Supreme Court stated that the term “public purpose”:
... connotes an activity which serves as a benefit to the community as a whole, and which, at the same time is directly related to the functions of government---- In each instance where the test is to be applied the decision must be reached with reference to the object sought to be accomplished and to the degree and manner in which the object affects the public welfare, (citations omitted). [M]
There are no cases in New Jersey which specifically deal with the issue of whether a mayor who successfully defends against an election contest can be compensated by the city for his legal expenses. There are cases, however, which deal generally with the obligation of a municipality to pay the legal fees of its officials.
Several early New Jersey cases have held that a municipality may properly indemnify its officials so long as the expenses are incurred in the performance of official duties or in defense of actions challenging official acts. For example, in State, Lewis, Pros. v. Freeholders of Hudson County, 37 N.J.L. 254 (Sup.Ct. 1874), the court held that the county freeholders could indemnify the county coroner for expenses arising from the arrest and transportation of an accused murderer. In a later case it was held that the town council of Hammonton could defend a malicious prosecution suit brought by the prosecutor against a council member who investigated the prosecutor’s handling of public monies. State, Bradley, pros. v. Council of Hammonton, 38 N.J.L. 430 (Sup.Ct.1876). The Bradley Court based its holding on the fact that the council member was involved in the bona fide discharge of his duties. It has also been held that a mayor who successfully defended against a suit brought on behalf of the city seeking to compel the mayor to take official actions which he determined to be illegal was entitled to reimbursement for his legal defense. Barnett v. Paterson, 48 N.J.L. 395 (Sup.Ct.1886).
*150The recurring theme in the above line of cases is that an individual must be acting in an official capacity in order for indemnification of expenses to be proper. Indeed, in the Barnett decision, it was held that where the presentation of a legal defense was required of the mayor in fulfilling his official responsibilities, indemnification is not only permissible but mandated. Id. at 398. This court does not interpret the Barnett decision, however, to require that a mayor must be reimbursed by the city for legal expenses every time he is forced to defend against a lawsuit. Implicit in the reasoning of the above cases is the proposition that the mere fact that it is a public official who is involved in the suit is not dispositive. The courts have consistently looked to the subject matter of the underlying suit in determining whether the public may bear the burden of the expense. If the allegations of the law suit itself do not involve the exercise of or the failure to exercise an official duty, the public official is not entitled to indemnification and the appropriation of funds by a city council for such a purpose would be impermissible.
More recent New Jersey cases comport with the policy of indemnifying public officials only for expenses which arise in the performance of an official duty or from actions taken in an official capacity. O’Donnell v. Morris County Freeholder Board, 31 N.J. 434 (1960) (public body could authorize reimbursement of a public official for expenses incurred in the discharge of his duties); Cobb, et als v. City of Cape May, et al, 113 N.J.Super. 598 (Law Div.1971), (mayor compensated for expenses incurred in defense of libel suit for statements made in his capacity as mayor even though making statements on behalf of the city was not part of his official duties); Golaine v. Cardinale, 142 N.J.Super 385, 404 (Law Div.1976) (counsel fees had been allowed to municipal officials in the past “only where the officer required legal defense to justify an action taken in his official capacity and in the performance of his duties.” (citations omitted).
*151An examination of the case law of other jurisdictions reveals a Florida case which arose on virtually identical facts. Markham v. State, Department of Revenue, 298 So.2d 210 (Fla.App. 1974). The plaintiff there, the tax assessor of Broward County, Florida, successfully resisted a contest to his election based on a challenge to the validity of certain absentee ballots. In holding that the plaintiff was not entitled to have the attorney’s fees he had incurred paid out of public funds, the Florida court made the following observation:
[T]he suit was a pure and simple election contest relating to the validity of certain absentee votes ____had the contestant been successful in his attack upon the votes the appellant would have ceased to be tax assessor and his opponent would have taken office. The office, functions and duties of tax assessor would not have been in any manner altered. There would simply have been another man filling the position. The legal battle between the political contestants in the election contest was purely personal. [Id. at 212.]
The Markham decision also referred to an earlier ruling, Peck v. Spencer, 26 Fla. 23, 7 So. 642 (1890), wherein the Florida Supreme Court held that a town council lacked authority to provide counsel for the acting mayor in an election contest on the ground that: “(S)uch power is not given in its charter, either expressly or by reasonable implication. These contests are personal and the corporation can have no interest in the result, and an appropriation to pay any one of the parties the expenses he may be put to is without legal authority.” Peck, supra, 7 No. at 644.
The reasoning of the above cases is persuasive. One of the key issues in the Matthews election contest involved the sufficiency and validity of absentee ballots. In addition, there were allegations of fraud, mismanagement and negligence on the part of plaintiff. All of the wrongdoing charged was alleged to have occurred prior to the election. The fact that plaintiff was named as a defendant in the election contest both individually and in his capacity as mayor does not change the nature of the allegations. At no time was plaintiff acting in an official capacity as mayor when the alleged wrongdoing occurred.
*152The above analysis can be carried one step further. It was not necessary that the complaints in the election contest be filed after the plaintiff took office. The suits could have been filed on June 16, 1982, the day after the election and two weeks prior to Matthews assuming his official position. Had the election contest been concluded prior to plaintiff assuming the position of mayor, clearly neither party would have been entitled to reimbursement from the city. As a practical matter, however, the time required to prepare the complaints and exhibits necessarily delayed filing beyond that point. This court holds that the time of filing is therefore a fortuitous event which does not result in the shifting of responsibility for the legal fees.
Defendants have also raised an alternative argument which must be addressed. Defendants contend that plaintiffs exclusive remedy for the award of counsel fees is contained in N.J.S.A. 19:29-2, which requires that the challenger in an election contest post a $500 bond along with the petition to cover “all costs in the event that the election be confirmed____” Since court awarded counsel fees have been classified in the same category as costs, Katz v. Farber, 4 N.J. 333, 338 (1950), defendants thus argue that counsel fees incurred in the prior actions may be reimbursed only to the limit permitted by statute. Defendants have submitted no legislative history to this court which clarifies the intent of the legislature in enacting N.J.S.A. 19:29-2. Furthermore, the Katz decision provides no guidance in this matter other than the naked assertion that counsel fees and costs are analogous. Thus, while there may be some support for the proposition that N.J.S.A. 19:29-2 is the exclusive remedy of plaintiff, the record is barren of any authority which persuades this court to determine the issue in defendants’ favor. Such a determination is not necessary, however, given this court’s earlier determination that the common law precludes defendants from paying plaintiff’s counsel fees.
*153Despite the above conclusions plaintiff urges certain alternative theories as supporting a contrary result. For the reasons to be expressed, however, this court finds those arguments unpersuasive. For example, plaintiff suggests that the policy of the New Jersey Campaign Contributions and Expenditures Reporting Act, (hereinafter referred to as Reporting Act) N.J.S.A. 19:44A-1, et seq., mandates reimbursement. This position is without merit. Plaintiff argues that there is little difference between the Reporting Act, which requires disclosure of campaign funds, and judicial action directed toward equalization of a candidate’s ability to successfully defend an election contest. In support of that contention plaintiff relies on New Jersey State Chamber of Commerce v. New Jersey Election Law Enforcement Commission, 135 N.J.Super 537, 544 (Ch.Div.1975), reversed on other grounds 155 N.J.Super 218 (App.Div.1977), modified on other grounds and affirmed, 82 N.J. 57 (1980). That case defined the objective of the Reporting Act to be an “attempt to regulate the significant flow of substantial wealth aimed at affecting the outcome of elections ----” Plaintiff thus argues that the intent of the Reporting Act and the judicial interpretation of that Act empower this court with the authority to equalize the ability of candidates to successfully defend an election contest. This analysis also rests on State v. Green, 62 N.J. 547, 554 (1973), which held that “(E)very effort should be made to harmonize the law relating to the same subject matter.” While the Reporting Act does represent an attempt to control campaign spending, nowhere in the Act itself is there a prohibition on the amount spent in a municipal election and nowhere in the Act does it provide that a candidate for municipal office with limited financial resources shall be subsidized with public funds. Plaintiff is requesting this court to legislate beyond the limits which the state legislature has deemed appropriate. It is not the court’s function to engage in such practices. See Matawan v. Monmouth County Tax Board, 51 N.J. 291, 298 (1968).
*154When carried to its logical conclusion, plaintiffs position-would also require that public funds be expended to pay the legal expenses of individuals initiating an election contest. Such an action would be necessary in order to ensure that an individual with limited resources is not prevented from asserting what are believed to be legitimate objections to the election of a wealthy individual. It is for the legislature to determine such policy, not the court. In re New Jersey State Bar Association, 112 N.J.Eq. 236, 287 (E. & A.1932) (“The legislature is the sole judge of the necessity to make appropriations of public moneys”). Had the legislature intended that either party to an election contest be reimbursed out of public funds for litigation expenses it could have said so explicitly. Hopewell Baptist Church of Newark, N.J. v. Gary, 111 N.J.Super 1, 5, affirmed 57 N.J. 166 (App.Div.1970). (The legislature is the “governmental branch best equipped to discern and enunciate public policy”).
Plaintiffs next argument rests on equal protection grounds. The legislature has determined that a legal defense should be provided with respect to members of school boards of education, N.J.S.A. 18A:12-20,1 and with respect to municipal police officers; N.J.S.A. 40A:14-155.2 Both provisions insulate *155the respective officials from liability for legal expenses which arise in the course of, or out of the performance of, official duties. Contrary to plaintiffs contention, the failure of the legislature to include mayors within the categories of individuals who are to be reimbursed for legal expenses does not deprive plaintiff of equal protection of the law. Plaintiff bases his position on Suruda v. Jersey City Bd. of Educ., 167 N.J.Super. 331 (Law Div.1979), which held that N.J.S.A. 18A-12-20 required indemnification of three school board members whose appointments were challenged in a law suit. Only one of the three board members successfully defended the suit. Plaintiff claims that there is no basis for excluding mayors from statutes providing legal fees to members of boards of education and police departments.
The court is not persuaded by plaintiffs argument. It is well established that the Equal Protection Clause “does not require that a state must choose between attacking every aspect of a problem or not attacking the problem at all. (citation omitted). It is enough that the State’s action be rationally based and free from invidious discrimination.” Dandridge v. Williams, 397 U.S. 471, 486-487, 90 S.Ct. 1153, 1162, 25 L.Ed.2d 491 (1970). There is clearly a rational basis for indemnifying police officers and members of boards of education while not indemnifying mayors.
The very nature of a school board position appears to be the justification for indemnification for members of boards of education. The members of boards of education serve their terms without compensation. Only their expenses of serving on the board are reimbursed. In Suruda, supra, the court found the two board members who were disqualified both fulfilled the duties of their non-pay positions during the pendency of the *156litigation. Suruda, supra, 167 N.J.Super. at 334. It is in situations similar to Suruda in which the greatest hardship would be imposed; where an individual who donates his time for the public welfare would risk incurring legal expenses absent an appropriate statute. Additionally, the defendants in Suruda were appointed to their positions, they were not elected. In effect, it was actually the official act of the mayor in appointing the defendants which was being challenged and for which indemnification was provided.
The intention of the legislature when it enacted N.J.S.A. 40A:14-155 was articulated in Van Horn v. City of Trenton, 80 N.J. 528 (1979). Therein, the Supreme Court found that:
... the terms of the statute itself evidence an apparent legislative concern that police officers might be discouraged from effectively pursuing their duties if they were forced to provide their own defense against civil actions and criminal charges brought by disgruntled “victims” of law enforcement. Police officers, by the very nature of their duties, are exposed to a substantial risk that such civil or criminal actions will be initiated, regardless of their merits, (citations omitted). The possibility of having to incur legal expenses to answer for one’s conduct as a police officer would most certainly temper one’s performance of police duties. We are convinced that the Legislature, by enacting N.J.S.A. 40A:14-155, was obviously attempting to minimize the intrusion of this concern into the momentary decisions which police officers are continually required to make. [Id. at 536, 537.]
This court holds that there is a rational basis for providing indemnification for school board members and police officers while not providing the same benefit to mayors. Generally, a mayor is not subject to the same quick-second decisions which a police officer faces on a day to day basis. Furthermore, the mayoral position is a compensated position whereas a school board position is not a compensated position. The refusal of the legislature to provide indemnification for mayors does not constitute invidious discrimination.
Finally, even if plaintiff were deemed to have been denied Equal Protection of the law by the operation of the two aforementioned statutes, the remedy would not be to order the city to provide counsel fees. The remedy for such unreasonable or discriminatory classifications is that “the statute must *157fall.” Raybestos — Manhattan, Inc. v. Glaser, 144 N.J.Super. 152, 185 (Ch.Div.1976), affirmed 156 N.J.Super. 513 (App.Div. 1978). Invalidating N.J.S.A. 18A:12-20 and N.J.S.A. 40A:14-155 would not provide plaintiff with the relief he seeks, it would only deprive police officers and members of boards of education of benefits which the legilature deemed appropriate to bestow upon them.
Plaintiffs final contention is that public policy considerations mandate that defendants pay plaintiffs counsel fees. Plaintiff contends that if relief is not granted in a situation such as this, individuals will be discouraged from seeking public office in the future out of concern over expenses which may arise from the defense of election contests. Again, however, this is an issue ideally suited to legislative determination, not judicial. In re New Jersey State Bar Association, supra.
For the reasons contained herein, it is ordered that plaintiffs motion for summary judgment be denied and that defendants’ motion for summary judgment be granted. Plaintiff is not entitled to have the city pay his legal fees for the election contest.
Whenever a civil or criminal action has been or shall be brought against any person for any act or omission arising out of and in the course of the performance of his duties as a member of a board of education, and in the case of a criminal action such action results in final disposition in favor of such person, the board of education shall defray all costs of defending such action, including reasonable counsel fees and expenses, together with costs of appeal, if any, and shall save harmless and protect such person from any financial loss resulting therefrom. Any board of education may arrange for and maintain appropriate insurance to cover all such damages, losses and expenses.
Whenever a member or officer of a municipal police department or force is a defendant in any action or legal proceeding arising out of or incidental to the performance of his duties, the governing body of the municipality shall provide said member or officer with necessary means for the defense of such action or proceeding, but not for his defense in a disciplinary proceeding instituted against him by the municipality or in a criminal proceeding instituted as a *155result of a complaint on behalf of the municipality. If any such disciplinary or criminal proceeding instituted by or on complaint of the municipality shall be dismissed or finally determined in favor of the member or officer, he shall be reimbursed for the expense of his defense.