The opinion of the court was delivered by
WINKELSTEIN, J.A.D.Defendant, Louis Pirrello, was a Morris Township Police Officer. Plaintiff, Imma Aperuta, sued him and the Township for defamation after he told a third party that plaintiff may have AIDS. Plaintiff alleged, among other things, that Pirrello was acting in the course of his employment at the time he made the statement. The Township declined to provide Pirrello with a defense to plaintiffs complaint on the grounds that when he made the remark, he was off duty and not “acting in [his] professional capacity within the course and scope of his employment.” The case with plaintiff settled for $22,000; Pirrello paid $2500 and the Township paid the rest.
Pirrello moved to compel the Township to pay his $15,000 counsel fee. The Law Division judge granted the motion, finding that the Township owed Pirrello a defense under N.J.S.A. 40A:14-155. It is from that decision that the Township appeals. We affirm.
The material facts are essentially undisputed. Pirrello was hired by the Township as a police officer in June 1997. During his training that summer, he and his field training officer, Richard *452Femme, responded to a 911 call from plaintiffs residence. On the way to the house, Ferrone told Pirrello to “glove up” when he went to the house, meaning that plaintiff had AIDS. From that point until the incident at issue, which occurred on April 7, 2001, Pirrello did not tell anyone that plaintiff had AIDS.
On the latter date, Pirrello, his brother-in-law, Ronald Price, and Price’s friend and co-worker, Steve Kurilla, attended a private dinner at a hunting club. Pirrello, who was off duty and not in uniform, met Kurilla for the first time that evening. During their conversation on the way home from the dinner, Kurilla mentioned a woman he “was breaking up with or on the verge of [breaking up with].” When Pirrello learned that Kurilla was talking about plaintiff, he told him: “be careful, she may possibly have the package,” referring to AIDS. Pirrello admits making the statement. It is undisputed that he told Kurilla what he believed to be plaintiffs condition because he did not want him to risk getting AIDS.
Kurilla subsequently told plaintiff what Pirrello said. She became upset. She told Kurilla that several years earlier (on May 7, 1997, a month before Pirrello was hired by the Township), the police responded to her home after she took an overdose of pills. At that time, .she told the police she feared she was HIV-positive. She subsequently learned that she was not.
When a municipal police officer is a defendant in a lawsuit, the governing body of the municipality is required to provide the officer with the means for a defense of that action if the “legal proceeding [arose] out of and [was] directly related to the lawful exercise of police powers in the furtherance of his official duties.” N.J.S.A. 40A:14-155. Mindful of those criteria, the Law Division judge provided the following reasons in support of her order that the Township pay Pirrello’s counsel fees:
While it was a narrow [decision] as to whether Pirrello was involved in a “proceeding arising out of or directly related to the lawful exercise of police powers in the furtherance of his official duties,” N.J.S.A. 40A:14-155, [Pirrello] has shown by a preponderance that his communication “arose out of’ his employment. He received the information while on duty, from his commanding officer. In an effort *453to avoid both transmission of AIDS and a violation of N.J.S.A. 2C:34-5(b), both goals of Ms employment, he made the communication in question. Accordingly the nexus is sufficient, even if just barely so.
N.J.S.A. 40A:14-155 was amended in 1986 (the 1986 amendment). L. 1985, c. 457 § 1. Before the amendment, an officer was entitled to a defense if the legal proceeding “[arose] out of or [was] incidental to the performance of his duties.” Monek v. Borough of S. River, 354 N.J.Super. 442, 451, 808 A.2d 114 (App.Div.2002). When initially enacted in 1946, the statute was intended to “ ‘increase the morale of police departments.’ ” Van Horn v. City of Trenton, 80 N.J. 528, 536, 404 A.2d 615 (1979) (quoting Statement Accompanying Senate Bill No. 26 (1946)). It was enacted, in part, in “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.” Van Horn, supra, ibid.
The New Jersey Supreme Court broadly interpreted the statute’s reach, finding that it afforded municipal police officers a defense not only to actions where charges against the officer arose from the performance of that officer’s duties, but also applied:
whenever an officer is required to pay counsel to respond to unfair charges because he is an officer, and unfair charges arise not only from performance of duties. They are sometimes made, and often without foundation, against someone, not because he or she did anything at all, but solely and primarily because of his or her identity or status as a police officer.
[Moya v. City of New Brunswick, 90 N.J. 491, 500-01, 448 A.2d 999 (1982) (footnote omitted).]
In other words, so long as a defendant’s “status” as a police officer was the reason the officer was a defendant in a lawsuit, the Court construed N.J.S.A. 40A:14-155 to require a municipality to provide the officer with a defense.
That interpretation of the statute triggered a legislative response. Effective January 15, 1986, the Legislature enacted the 1986 amendment to counter the Court’s decisions that had expanded the literal terms of the original legislation. See Sparkman v. City of Atlantic City, 237 N.J.Super. 623, 628-29, 568 A.2d 917 *454(App.Div.) (finding amendment to N.J.S.A. 40A:14-155 intended to “counter the judicial decisions that expanded the obligations imposed upon municipalities to reimburse police officers beyond the literal terms of the statute”), certif. denied, 121 N.J. 660, 583 A.2d 346 (1990). To effectuate that intent, the words arising out of or incidental to the performance of his duties were replaced with: arising out of and directly related to the lawful exercise of police powers in the furtherance of his official duties. Monek, supra, 354 N.J.Super. at 451, 808 A.2d 114 (our emphasis). The amendment was intended to “eliminate the coverage of this section for charges arising from acts outside the scope of police duties, but occurring in the course of the performance of those duties, and for ‘status charges.’ ” Senate County and Municipal Government Committee Statement, Senate No. 1684 L. 1985, c. 457. Under the amendment, the focus is on the “nature of the police officer’s conduct rather than who has initiated the proceeding against him.” Gabbianelli v. Twp. of Monroe, 271 N.J.Super. 544, 549, 638 A.2d 1377 (App.Div.), certif. denied, 137 N.J. 307, 645 A.2d 136 (1994).
Here, Pirrello claims that under the 1986 amendment the Township was obligated to provide him with the means for his defense. He asserts that while the incident did not occur during his designated working hours, as a police officer he is always on duty with an obligation to enforce the law and protect the public. He contends that is what he was doing when he warned Kurilla about his possible exposure to AIDS. To support this argument, he relies on a number of factors. First, he points to the Township Law Enforcement Code of Ethics (the Code) found in the Morris Township Police Manual. That says, in part,
As a LAW ENFORCEMENT OFFICER, my fundamental duty is to serve mankind; to safeguard lives and property____
General Responsibilities. Members shall at all times take appropriate action to:
(a) Protect life and property.
(b) Preserve the peace.
(c) Prevent crime.
(d) Detect and arrest violators of the law.
*455(e) Enforce all Federal, State and local laws and ordinances coming within department jurisdiction.
Pirrello claims that based on the Code, police officers have a duty to safeguard lives not only during prescribed working hours, but “at all times,” including when officers are formally off duty.
Next, he points to N.J.S.A. 2C:34-5b, which makes it a third-degree offense for a person who knows he or she is infected with HTV to commit an act of sexual penetration without the informed consent of the other party. Pirrello’s argument is that he warned Kurilla about plaintiffs medical condition to prevent him from becoming a victim under that law. Given that Kurilla was dating plaintiff, whom Pirrello had reason to believe had AIDS, Pirrello claims there was a “direct risk” that Kurilla would be exposed to the HIV virus. He argues he was safeguarding Kurilla’s life by attempting to prevent him from contracting AIDS.
At oral argument, the Township conceded that just because Pirrello was not formally on duty when he made his remarks is not a reason to deny him a means for a defense under N.J.S.A. 40A:14-155. It claims instead that Pirrello’s remarks about plaintiff did not arise “out of,” nor were they “directly related to the lawful exercise of police powers in the furtherance of his official duties.” Simply put, the Township argues that because Pirrello did not make the remark while conducting official police business, it was not required to provide him with the means for his defense.
The Township also claims that Pirrello’s actions violated section 122.4.9 of its confidentiality procedures, which provide: “New Jersey law requires written informed consent for the release of any record containing identifying information about a person who has, or is suspected of having, AIDS or HIV infections, except in instances required by State and federal law.” The Township argues that while Pirrello did not literally violate this provision because he did not release records that contained identifying information about plaintiff, he violated its spirit by verbally disclosing that plaintiff was suspected of having AIDS. Nevertheless, *456an internal affairs investigation conducted by the Township police department revealed no regulatory or criminal violations.
While we have examined the applicability of the 1986 amendment on several occasions, we have not done so in the factual context presented here. For example, in Sparkman, supra, 237 N.J.Super. at 624-25, 568 A.2d 917, the municipality appealed from a Law Division order to pay counsel fees and costs incurred by the plaintiff, a police sergeant employed by the City, after he was charged with, but acquitted of, conspiracy to commit official misconduct, and disciplinary charges were resolved in his favor. The charges arose out of Sparkman’s attendance at a party at the home of another officer, where Sparkman was alleged to have failed to arrest those using drugs. Ibid.
We reversed the counsel fee award because the charges stemmed solely from Sparkman’s failure to exercise his official duties — he failed to arrest those participating in allegedly illegal conduct. Id. at 629, 568 A.2d 917. In other words, Sparkman was not alleged to have wrongly executed his police powers; rather, he was charged with failing to act by not arresting the alleged drug users. We found that permitting reimbursement under those circumstances would “subvert the legislative intent [of the 1986 amendment] by encouraging inaction on the part of police officers who are duty bound to act in certain circumstances without fear of economic consequences of defending any criminal or disciplinary charges that may be lodged against them.” Ibid.
We again addressed the 1986 amendment in Bruno v. City of Atlantic City, 239 N.J.Super. 469, 571 A.2d 1003 (App.Div.), certif. denied, 122 N.J. 165, 584 A.2d 231 (1990). In Bruno, officer Alfred Bechard, like Sparkman, was charged with failure to arrest officer Gerald Bruno, the host of the party, whom Bechard allegedly knew to be in possession of cocaine. Id. at 471, 473, 571 A.2d 1003. Because Bechard was not charged with an act arising out of his duties, but a failure to act, as was Sparkman, we reversed the counsel fee award. Id. at 472, 475, 571 A.2d 1003.
*457Bruno, however, was charged with theft by unlawfully removing cocaine from an impounded vehicle that he had been assigned to guard. Id. at 472, 571 A.2d 1003. He was on duty, wearing his uniform, when he allegedly took the cocaine from the car for his own use and distributed it at the party. Id. at 472-73, 571 A.2d 1003. Bruno was acquitted on all counts, and awarded counsel fees. Id. at 470-71, 571 A.2d 1003.
We reversed the counsel fee award because the criminal acts charged against Bruno, while directly related to the exercise of his official duties, were not “related to the lawful exercise of police powers and the furtherance of his official duties.” Id. at 473, 571 A.2d 1003 (emphasis added). In other words, “the criminal activities charged were outside the scope of his police duties.” Ibid. Because Bruno had an “ulterior illegal goal” that “constituted a perversion of his job,” he did not fall under the umbrella of the 1986 amendment. Ibid.
In Gordon v. Borough of Middlesex, 268 N.J.Super. 177, 179, 632 A.2d 1276 (App.Div.1993), the plaintiff was indicted for interfering with an internal investigation of a fellow officer. Officer Peter Gordon allegedly used the department computer to complete a background check on two witnesses who were interviewed in connection with the investigation. Id. at 180, 632 A.2d 1276.
Reversing a summary judgment order that awarded Gordon counsel fees, we found a genuine issue of fact as to whether his use of the computer system was a lawful exercise of his police powers in furtherance of his official duties, or whether the use was personal, and therefore outside the coverage afforded by N.J.S.A. 40A:14-155. Id. at 185-86, 632 A.2d 1276. In so doing, we stated that if Gordon had an “ulterior illegal goal” that advanced his personal purpose, that would be tantamount to a perversion of his official duties and he would be ineligible for a defense under the 1986 amendment. Id. at 186, 632 A.2d 1276.
More recently, in Monek, supra, 354 N.J.Super. at 445, 808 A.2d 114, we reviewed a Law Division order that required the Borough to reimburse the plaintiff police officer, Christopher Monek, for *458his counsel fees and costs in defending charges of official misconduct, aggravated assault and witness tampering. The incident that brought about the assault charges occurred when Monek, while on duty, arrested a man who was drunk and uncooperative. Id. at 445-46, 808 A.2d 114. According to Monek, the man hit his head on the cell bars while thrashing around. The suspect claimed that Monek pushed him up against the cell and struck his forehead on the bars, knocking him unconscious. Id. at 446, 808 A.2d 114. The witness tampering charge arose out of allegations that Monek attempted to induce another officer to “testify or inform falsely.” Id. at 447, 808 A.2d 114. After the charges were downgraded, a municipal court judge acquitted Monek. Ibid.
We concluded that under N.J.S.A. 40A:14-155 Monek was entitled to reimbursement for defense of the assault charges, which were brought as a result of action taken by Monek while performing his police duties — arresting a suspect. Id. at 450-51, 808 A.2d 114. On the other hand, we found that he was not entitled to a defense under N.J.S.A. 40A:14-155 for the witness tampering charge, as it arose because of alleged illegal action he took after he was charged with assault. Id. at 451, 453, 455, 808 A.2d 114.
Two key principles emanate from these cases. To determine whether a police officer is entitled to a defense at the municipality’s cost under N.J.S.A. 40A:14-155, we first examine whether the legal proceedings were grounded on an affirmative act by the officer, rather than the officer’s failure to act. See Bruno, supra, 239 N.J.Super. at 472, 571 A.2d 1003; Sparkman, supra, 237 N.J.Super. at 629, 568 A.2d 917. Next, if the officer did commit an affirmative act, the question becomes whether the officer acted with an ulterior illegal goal that would have perverted his or her job. See Gordon, supra, 268 N.J.Super. at 185-86, 632 A.2d 1276; Bruno, supra, 239 N.J.Super. at 473, 571 A.2d 1003.
Here, we are satisfied that under this test, the Township was required by the 1986 amendment to provide Pirrello With a *459means for his defense. First, Pirrello was sued because he took an affirmative act, not because he failed to act.
Next, no dispute exists as to the officer’s motives when he made the allegedly defamatory remarks. Pirrello did not have an “ulterior illegal purpose”; rather, he was trying to protect Kurilla from getting AIDS. Thus, his reasons for acting were not a “perversion” of his job.
A closer question is whether his disclosure of private information that arguably violated the spirit of departmental regulations barring the dissemination of records containing information about a person identified as having, or suspected of having, AIDS or an HIV infection, was a “perversion” of his job. We conclude that, under the circumstances, it was not.
Prevention of a disease such as AIDS is an appropriate state objective. Doe v. Borough of Barrington, 729 F.Supp. 376, 385 (D.N.J.1990). “An individual’s privacy interest in medical information and records is not absolute. The court must determine whether the societal interest in disclosure outweighs the privacy interest involved.” Ibid. Here, when Pirrello made the statement, Kurilla was at immediate risk because he was in an ongoing relationship with plaintiff whom Pirrello believed had AIDS. The officer was fostering a legitimate state interest by preventing Kurilla from becoming a victim under N.J.S.A. 2C:34-5b. Said another way, his actions were intended to prevent the transmission of AIDS. His actions were not illegal as they were alleged to have been in Bruno and Monek.
Providing a defense to Pirrello under these circumstances is also consistent with the objectives of N.J.S.A. 40A:14-155 as originally enacted: to “ ‘increase the morale of police departments’ ”; to alleviate “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”; and “to minimize the intrusion of this *460concern into the momentary decisions which police officers are continually required to make.” See Van Horn, supra, 80 N.J. at 536-37, 404 A.2d 615 (quoting Statement Accompanying Senate Bill No. 26). In light of these goals, in hindsight, we decline to question Pirrello’s judgment given the circumstances he faced at the time.
Finally, whether Pirrello was working set hours when he made the allegedly defamatory remarks does not impact upon whether he was entitled to reimbursement. Under the Code, he was required “at all times” to protect the public. Furthermore, even while off duty a police officer must respond to a crime committed in his presence. State v. Corso, 355 N.J.Super. 518, 526, 810 A.2d 1130 (App.Div.2002), certif. denied, 175 N.J. 547, 816 A.2d 1048 (2003); cf. Domanoski v. Borough of Fanwood, 237 N.J.Super. 452, 455, 457, 568 A.2d 123 (App.Div.1989) (in workers compensation case, police officer who made arrest while employed as private security guard, considered employee of both the municipality and private security company).
While to arrive at our decision we followed the reasoning in existing case law, an alternate analysis may be employed, which, under the facts here, achieves the same result. That is, to determine if a municipal police officer is entitled to a means for a defense under N.J.S.A. 40A:14-155, we examine whether the lawsuit was grounded on action taken by the accused officer in the “scope of his or her employment.”
Recently, in another context, we examined whether a state employee, a Special Assistant to the Commissioner of Labor, was entitled to reimbursement for counsel fees after being sued by co-employees under the Conscientious Employee Protection Act, N.J.S.A. 34:19-1 to -8, for racial, ethnic and sexual slurs he allegedly made at a regularly scheduled staff meeting. Prado v. State of New Jersey, 376 N.J.Super. 231, 235-36, 870 A.2d 294 (App.Div.2005). The controlling statute, rather than N.J.S.A. 40A:14-155 as is applicable here, was N.J.S.A. 59:10A-1, which requires the Attorney General to provide for “the defense of any *461action brought against such State employee or former State employee on account of an act or omission in the scope of his employment.” Id. at 240, 870 A.2d 294. In Prado, taking our lead from the Restatement, we defined an act to be within the scope of employment if, “ ‘it is of the kind [that the servant] is employed to perform; it occurs substantially within the authorized time and space limits; [and] it is actuated, at least in part, by a purpose to serve the master.’ ” Id. at 243, 870 A.2d 294 (quoting Di Cosala v. Kay, 91 N.J. 159, 169, 450 A.2d 508 (1982)) (quoting Restatement (Second) of Agency § 228 (1957)). Applying that test, we found that Prado was entitled to a defense from the State. Id. at 245, 870 A.2d 294.
We find no discernable difference between the language of N.J.S.A. 40A:14-155 and the “scope of employment” language in N.J.S.A. 59:10A-1 addressed in Prado. The 1986 amendment provides the officer with a defense when the charges arise “out of and [are] directly related to the lawful exercise of police powers in the furtherance of his official duties.” N.J.S.A. 40A:14-155. The Legislature’s intent behind that language was to eliminate coverage for “status” charges and charges arising from acts that occurred in the course of a police officer’s employment but fell outside the scope of the officer’s police duties. See Senate County and Municipal Government Committee Statement, Senate No. 1684 L. 1985, c. 457. Given that context, we take the current language of N.J.S.A. 40A:14-155 to effectively mean that to receive a defense at the local government’s expense, the actions that resulted in the lawsuit against the officer must have been taken by the officer in the scope of his employment. Without directly discussing the scope of employment analysis, we expressed a similar view in Bruno, supra, where we determined the officer did not qualify for a defense under N.J.S.A. 40A:14-155 because “the criminal activities charged were outside the scope of his police duties.” 239 N.J.Super. at 473, 571 A.2d 1003.
Next, then, we apply the “scope of employment” analysis to the facts here. What constitutes “scope of employment” is informed *462by the Restatement of Agency, §§ 228 and 229. Carter v. Reynolds, 175 N.J. 402, 411-12, 815 A.2d 460 (2003). The factors to be considered to determine if an employee’s conduct fall within the scope of his employment are:
(a) it is of the kind [the servant] is employed to perform;
(b) it occurs substantially within the authorized time and space limits;
(c) it is actuated, at least in part, by a purpose to serve the master,
[Restatement (Second) of Agency § 228 (1958).]
Restatement section 229 provides:
(1) To be within the scope of the employment, conduct must be of the same general nature as that authorized, or incidental to the conduct authorized.
(2) In determining whether or not the conduct, although not authorized, is nevertheless so similar to or incidental to the conduct authorized as to be within the scope of employment, the following matters of fact are to be considered:
(a) whether or not the act is one commonly done by such servants;
(b) the time, place and purpose of the act;
(j) whether or not the act is seriously criminal.
[Carter, supra, ibid. (quoting Restatement (Second) of Agency § 228, 229).]
Applying these factors here, we reach the same conclusion that we do when we analyze the facts under prior case law — that Pirrello was entitled to a means for his defense under N.J.S.A. 40A:14-155.
To protect Kurilla from getting AIDS and from becoming a victim in violation of N.J.S.A. 2C:34-5(b), Pirrello informed him that the person with whom he was having a relationship may have that disease. He had obtained the information as part of his job as a police officer. His actions were either the type of conduct, or similar to the type of conduct, a police officer is employed to perform.
That Pirrello was not officially on duty is not dispositive. The Code requires an officer to take appropriate action to protect life and prevent crime “at all times.” And, to repeat, we have held in the past that even while off duty, a police officer is required to respond to a crime that takes place in his presence. See Corso, supra, 355 N.J.Super. at 526, 810 A.2d 1130. What is more, *463though he made the statement during a personal trip, his motive for making the statement was the same as it would have been if he was working designated hours in uniform. And notably, the bulk of the $22,000 settlement with plaintiff was paid by the Township. While this may not have been an acknowledgment by the Township that the officer’s actions were taken as the Township’s agent, it is a factor to be considered.
Pirrello’s remarks were made with a purpose to serve the public. He undisputedly made the statement to prevent the transmission of AIDS, not to disparage plaintiff. In fact, the record contains no evidence that Pirrello told anyone else about what he perceived to be plaintiffs condition during the almost four years from the time he learned about it in 1997 until he told Kurilla in 2001.
While the prior cases that addressed the 1986 amendment did not use a scope of employment analysis, those decisions are consistent with that methodology. The failure of officer Spark-man to arrest those using illegal drugs could not be said to have been actuated, even in part, “by a purpose to serve the master.” See Restatement (Second) of Agency, supra, §§ 228, 229. Similarly, Bruno, charged with unlawfully removing cocaine from a vehicle he was guarding and distributing the drugs at a party, also was alleged to have committed an act not actuated, even in part, by a purpose to serve the public. To risk stating the obvious, these acts are not generally considered to be within the scope of a police officer’s employment.
In Gordon, the officer was charged with interfering with an internal investigation of a fellow officer. 268 N.J.Super. at 179, 632 A.2d 1276. That too did not constitute an action taken, even in part, to serve the City or the public. And in Monek, supra, 354 N.J.Super. 442, 808 A.2d 114, a defense under N.J.S.A. 40A:14-155 was, in fact, warranted because the alleged assault occurred as a result of Monek’s efforts to make an arrest; while, conversely, witness tampering during the investigation of the assault charge *464did not meet the Restatement criteria to qualify as having occurred during the course of Monek’s employment.
Consequently, whether we analyze the facts of this case under the methodology used in Sparkman, Bruno, Gordon, and Monek, or use a scope of employment test, we arrive at the same conclusion. Pirrello was entitled to a means for his defense.
Affirmed.