
809 A.2d 789 (2002)
174 N.J. 523
H. Leslie McCURRIE; Joseph Bigelow; Joseph Sloan; Ann Marie Sloan; Diana Salwan; Manuel Salwan; Frank Cardoza; Philip Chidichimo; Carol Jean Doyle; Norman A. Doyle, Jr.; Margaret Pidgeon and Daniel Pidgeon, as taxpayers of the Town of Kearny in name of, for, and on behalf of the Town of Kearny, Plaintiffs,
v.
The TOWN OF KEARNY (discovery only and on Third Count), Defendant-Respondent, and
Robert M. Czech, Esq., Defendant-Appellant.
Supreme Court of New Jersey.
Argued September 10, 2002.
Decided November 20, 2002.
*791 Robert M. Czech argued the cause, pro se.
Gregory J. Castano, Jr., Nutley, argued the cause for respondent (Castano Quigley, attorneys; Lawrence Z. Kotler and Laura J. Wadleigh, on the briefs).
*790 The opinion of the Court was delivered by LaVECCHIA, J.
Defendant Robert M. Czech was the municipal clerk and administrator of the Town of Kearny. His appointment as municipal clerk was for a statutory three-year term although his appointment as administrator was at the Town's pleasure. Because a change in the political make-up of the governing body during Czech's statutory term induced him to believe that completion of his term would be counterproductive to both his and the public interest, he agreed with the outgoing municipal council that he would resign in return for a severance package. The severance agreement, approved by municipal resolution (the severance resolution), was challenged by plaintiffs-taxpayers in this action in lieu of prerogative writs in which both the Town and Czech were joined as defendants. The municipality, by resolution (the counsel-fee resolution), then undertook to pay the legal fees that Czech would incur in his defense of the severance resolution. The only question before us is whether the counsel-fee resolution constituted a permissible exercise of municipal power. We conclude that it did, and therefore reverse the contrary holding of the Appellate Division.

I.
The Town appointed Czech to his dual positions of municipal clerk and town administrator on July 13, 1995. The initial three-year term of a municipal clerk is prescribed by N.J.S.A. 40A:9-133a. At the time of Czech's appointment to that office, he entered into an employment agreement with the Town by which he was also appointed to the office of town administrator, an at-will position. N.J.S.A. 40A:9-137. The agreement provided for a base compensation of $85,000 for the combined position, and Czech's entitlement to health insurance, life insurance, paid holidays, and sick days was set forth.
As a result of the municipal elections of November 1997, the incumbent mayor and two council members were defeated. A third incumbent council member did not seek reelection. Accordingly, at the reorganization meeting scheduled for January 1, 1998, four new members, a majority, would join the governing body. There is no dispute that during their campaign and following their election, those new members made known their intention to attempt to remove Czech from his positions. According to Czech, it had become clear to him during the election campaign that if those persons were elected, his "continued employment with the Town was going to be a politically divisive issue, which would distract the Kearny Town Council from focusing on other more important Town business."
In order to avoid the anticipated tensions and difficulties that would result if Czech insisted upon the completion of his statutory and contractual terms of office, he and the outgoing mayor negotiated an agreement by which Czech would resign from both positions as of December 31, 1997, in return for a lump-sum severance payment and healthcare coverage extending *792 to March 31, 1998, a date well within his three-year term. The lump-sum gross severance payment was $32,894.20 allocated as follows: $980.75 to "Regular Earnings," $27,500 to "Special Earnings," and $4,413.45 in "Vacation Earnings." The after-tax sum was $23,363.86. Had Czech remained in office for the balance of his term, namely, until July 1998, he would have earned $46,042 in salary, thirteen and a half vacation days, and all the contractual fringe benefits.
A special session of the Town Council was held by the outgoing governing body on December 31, 1997, to consider Czech's resignation and the severance agreement. An approving resolution, the severance resolution, was adopted unanimously. The recitals of the resolution referred to Czech's statutory term and his resignation before its completion and explained that its purpose was "to allow the Municipal Governing Body to commence the new year with the opportunity to fill ... [Czech's] positions."
Plaintiff-taxpayers commenced this action against both the Town and Czech on January 15, 1998, challenging the severance resolution and asserting that because its subject was employee compensation, an ordinance was required. The Town was represented by its municipal attorney. Apparently the Town wished to remain in control of the defense of the litigation but took the view that because of a potential conflict of interest between it and Czech, Czech should be separately represented. The Town, therefore, proposed that it would select an attorney for Czech whom it would pay. Czech, an attorney at law of this State who could have represented himself, agreed. Accordingly, the Town adopted a second resolution, the counsel-fee resolution, retaining Robert Margulies, Esq. to represent Czech and capping the fees for that representation at $10,000. Following the adoption of the counsel-fee resolution, plaintiffs amended their complaint to add a count challenging that resolution as well. Czech filed a protective cross-claim against the Town seeking reinstatement to his two positions if the severance resolution were deemed invalid.
All parties filed motions for summary judgment. Plaintiff sought the setting aside of both the severance resolution and the counsel-fee resolution while defendants, the Town and Czech, urged the validity of the two resolutions. The court granted each motion in part. The court invalidated the severance resolution reasoning that because it constituted a compensation arrangement, an ordinance was necessary, but sustained the counsel-fee resolution as having a sufficient nexus to Czech's official duties. By that time, Margulies had directly billed the Town $6,000 for his services in representing Czech, and the Town had approved and paid those bills.
Czech appealed from that portion of the summary judgment invalidating the severance agreement, and plaintiffs cross-appealed from that portion of the summary judgment upholding the counsel-fee resolution. The Town, despite its defense of both resolutions in the trial court, did not participate in the appeal. The Appellate Division, in its reported decision, McCurrie v. Town of Kearny, 344 N.J.Super. 470, 474, 782 A.2d 919 (App.Div.2001), reversed both trial court rulings. Czech petitioned this Court for certification seeking review of the adverse counsel-fee holding, and plaintiffs cross-petitioned seeking review of the adverse ruling sustaining the severance resolution. Because we denied the plaintiffs' cross-petition, 171 N.J. 339, 793 A.2d 717 (2002), the Appellate Division's ruling that the severance agreement was not in the nature of compensation and hence did not require an ordinance is not *793 before us. However, we granted Czech's petition for certification in order to review the Appellate Division's decision that the counsel-fee resolution was ultra vires. Ibid. We now reverse that determination.

II.
The Appellate Division based its reasoning on N.J.S.A. 40A:9-134.1, which requires a municipality to defend and indemnify its municipal clerk in respect of any legal action or proceeding "arising out of and directly related to the clerk's lawful exercise of authority in furtherance of official duties...." In construing the phrase "arising out of and directly related," the court relied on identical language used by the 1986 amendment of N.J.S.A. 40A:14-155, which, in respect of disciplinary proceedings and criminal actions against local police officers, replaced the former, more broadly stated standard of "arising out of or incidental" to the performance of police duties. Noting that N.J.S.A. 40A:14-155 typically is construed narrowly to effectuate the "directly related" limitation, and taking the view that N.J.S.A. 40A:9-134.1 should be similarly construed, the court concluded that this action against Czech did not directly relate to the performance of his duties but rather to the personal matter of his severance compensation. Accordingly, it held that N.J.S.A. 40A:9-134.1 did not apply in the circumstances.
We do not disagree with the Appellate Division's reading of N.J.S.A. 40A:9-134.1. The statute imposes a mandatory duty on a municipal entity that encompasses the commitment of public funds. We apply such enactments with special circumspection to be faithful to the specific requirements for imposing that non-discretionary obligation on a municipality. The underlying facts here do not trigger the mandatory defense and indemnification obligation of N.J.S.A. 40A:9-134.1.
But that statute is not dispositive. That is to say, the fact that the Town was not compelled by the statute to defend Czech in this action does not include the corollary that the Town was without the discretion, as a policy decision and in the proper exercise of its municipal powers, to elect to do so.
The common law recognizes that although there may not be a statutory compulsion to do so, municipalities nevertheless have a moral obligation, and hence the discretionary authority, to pay expenses incurred in good faith by municipal employees acting in their official status, including the defense of legal actions challenging acts undertaken or performed by them in that status. See Kress v. LaVilla, 335 N.J.Super. 400, 414, 762 A.2d 682 (App.Div.2000); Matthews v. Atlantic City, 196 N.J.Super. 145, 149, 481 A.2d 842 (Law Div.), aff'd, 196 N.J.Super. 338, 482 A.2d 530 (App.Div.), certif. denied, 99 N.J. 213, 491 A.2d 708 (1984); Palmentieri v. City of Atlantic City, 231 N.J.Super. 422, 429, 555 A.2d 752 (Law Div.1988); Cobb v. City of Cape May, 113 N.J.Super. 598, 601, 274 A.2d 622 (Law Div.1971). See also O'Donnell v. Bd. of Chosen Freeholders of Morris County, 31 N.J. 434, 440-41, 158 A.2d 1 (1960) (holding that in absence of express limitation or prohibition, general powers granted to governing body permit its payment of public official's expenses incurred in matters involving public's interest); McQuillin, Municipal Corporations, § 12.137 at 655-58 (3d ed.2001). All that is necessary to justify the municipality's exercise of discretion to pay its employee's legal expenses is a showing that the employee was acting in good faith in the course of official duties in a matter in which the municipality had an interest. Golaine v. Cardinale, 142 N.J.Super. 385, *794 404, 361 A.2d 593 (Law Div.1976), aff'd, 163 N.J.Super. 453, 395 A.2d 218 (App.Div. 1978), certif. denied, 79 N.J. 497, 401 A.2d 252 (1979). The record makes clear that all these conditions were met.
There is no doubt that Czech acted in good faith in entering into the severance agreement attendant upon his early resignation. Nor is there any doubt that the municipality had an immediate and critical interest in the resignation by which an unproductive confrontation between Czech and the newly elected governing body was avoided and the governing body was rendered free to appoint a clerk and administrator of its own choice. The only legitimate question is whether Czech's action in resigning and entering into the severance agreement was reasonably related to his official position. That, as the Appellate Division pointed out in Kress, supra, 335 N.J.Super. at 414-15, 762 A.2d 682, is a fact-sensitive inquiry requiring analysis of the public official's action in its context to determine if it reasonably relates or has a reasonable nexus to the public office. The question, then, is whether the subject matter of the official's action relates to the public, rather than merely a personal, interest. We are satisfied that what happened here qualifies as action that reasonably relates to Czech's official status for purposes of the common-law moral obligation of the Town even though it does not qualify as "directly related" under N.J.S.A. 40A:9-134.1.
Czech had a statutory term of office. He could have insisted upon completing it, thus accepting the onus of prospective conflict between the new governing body and his own office and imposing that onus on the public as well. Rather than doing so, he chose to accede to the Town's request that he resign with a reasonable severance package. That action, although it may also have benefited Czech personally, was fundamentally one that advantaged the public interest, and the Town perceived it as such in its adoption of the severance resolution. It was that resolution, that is, the municipal action, that was the direct focus of plaintiffs' challenge. The taxpayer lawsuit was not challenging an individualized action taken by Czech. Czech's involvement was simply the necessary consequence of the Town's exercise of judgment as to the manner in which best to serve the public interest in the smooth and efficient functioning of the clerk and administrator offices. So viewed, it is clear that Czech's joinder as a party defendant bore a nexus to his official position sufficient to impose a moral obligation on the Town that it had the discretionary authority to fulfill.
But there is an even more fundamental reason for sustaining the Town's decision to pay Czech's legal fees for defense of this action. The Town is a body politic and corporate with the capacity to sue and be sued. N.J.S.A. 40A:62-1. It had the unquestionable authority to provide for its own defense to the plaintiffs-taxpayers' action and to determine how best to prosecute its defense. The thrust of the challenge was the Town's authority to adopt the two resolutions, and Czech's joinder as a defendant, predicated on his beneficiary status, did not alter the basic issues plaintiffs had raised. Nevertheless, a defense to the litigation offered by Czech inevitably would have had the capacity to affect the Town's defense. The Town evidently determined that its own cause would be furthered by its control of the overall defense and that it could achieve such control by appointing for Czech, at its own expense, an attorney of its choice who would work collaboratively and in tandem with the municipal attorney in prosecuting a coordinated defense. The Town could, of course, have opted to conduct the defense *795 differently, and it could have left Czech to his own representational decisions. But the course it chose was entirely reasonable, and its judgment in respect of that litigation decision is entitled to judicial deference. Under these circumstances, the Town's acknowledgment of its moral obligation to pay for Czech's defense, expressed in the counsel-fee resolution, was not only appropriate and within its discretionary authority, but was also beyond judicial interference.

III.
There is a final matter to be addressed. As we have pointed out, the Town did not participate in the Appellate Division proceedings although it vigorously defended the two resolutions in the trial court and successfully defended the counsel-fee resolution. It is only before this Court that it takes the position, entirely contrary to its position in the trial court, that the counsel-fee resolution was invalid. We think it clear that its about-face is a blatant violation of the principle of judicial estoppel, which precludes a party from taking a position contrary to the position he has already successfully espoused in the same or prior litigation. As we explained in State Department of Law & Public Safety v. Gonzalez, 142 N.J. 618, 632, 667 A.2d 684 (1995), judicial estoppel is a doctrine designed to protect the integrity of the judicial process by not permitting a litigant to prevail on an issue and then to seek the reversal of that favorable ruling. See also Richardson v. Union Carbide Indus. Gases, Inc., 347 N.J.Super. 524, 530, 790 A.2d 962 (App.Div.2002); Alampi v. Russo, 345 N.J.Super. 360, 367-68, 785 A.2d 65 (App.Div.2001); Lucia v. Monmouth Med. Ctr., 341 N.J.Super. 95, 103, 775 A.2d 97 (App.Div.), certif. denied, 170 N.J. 205, 785 A.2d 434 (2001). Nevertheless, because of the public interest involved, we have opted to consider the meritorious issue despite the Town's improper litigation posture.

IV.
The judgment of the Appellate Division invalidating the counsel-fee resolution is reversed.
For reversalChief Justice PORITZ and Justices COLEMAN, LONG, VERNIERO, LaVECCHIA, ZAZZALI and PRESSLER7.
OpposedNone.
