The state appeals from an order dismissing a criminal complaint against the defendant for one count of misconduct in public office contrary to sec. 946.12(2), Stats. This crime is punishable as a Class E felony. The issue is whether an act of consensual sexual intercourse between a prison guard and a prisoner, occurring when the guard is on duty, is punishable as an act done and forbidden to be done in the guard’s “official capacity” within the meaning of the statute. We agree with the trial court’s determination that, under the circumstances of this case, it is not. We therefore -affirm.
At the time of the alleged offense the defendant was employed as a prison guard at the Dodge Correctional Institution. A part of her duties was to maintain discipline among the prisoners in the ward she supervised. The complaint alleged that on three separate occasions, while on duty, the defendant, had sexual intercourse with a prisoner in her ward. The prisoner in question testified at a preliminary examination that he and the defendant had sexual intercourse once in his cell, once in a neighboring cell, and once in the laundry room of the *659ward between April and October 1980. During this period, he said, there were approximately twenty to twenty-five prisoners on the ward. There is no indication in the record that any other person observed the acts of intercourse.1 Similarly, there is no suggestion that the acts were other than purely consensual. The prisoner testified: “We had a relationship as a couple, a male/female relationship; sexual activities; gift givings.”
The material portion of sec. 946.12, Stats.,2 provides:
Any public officer or public employe who does any of the following is guilty of a Class E felony:
(2) In his capacity as such officer or employe, does an act which he knows is in excess of his lawful authority or which he knows he is forbidden by law to do in his official capacity. [Emphasis supplied.]
At the time of the alleged offense the fornication statute, sec. 944.15, Stats., 1981-82, prohibited sexual intercourse between persons not married to one another. Fornication was then classified as a Class A misdemeanor.3
The trial court determined that an act of fornication committed by a public officer while on duty did not, standing alone, constitute misconduct in office as defined by sec. 946.12 (2), Stats. It stated:
[The state’s] argument falls short of establishing . . . that the crime of fornication is one reasonably capable of being committed by a prison guard in his or her official capacity. Rationally, it is not an act which a prison guard is forbidden to do in his or her official capacity; *660it is forbidden to everyone, regardless of official capacity. It was not intended and should not be interpreted as an act “forbidden by law” within the meaning of Section 946.12. [Italics in original.]
We agree with the trial court’s conclusion. Although the meaning of the statute is far from clear, it requires on its face more than a mere violation of the criminal code by a public official. It requires both that the officer commit the act in an official capacity, and that the act be one which he is forbidden by law to do in an official capacity. We think this dual requirement of the statute evinces a legislative intention to confine the application of the statute to acts committed within the scope of public employment. The purpose of the law appears to be the prevention of the misuse of power entrusted to public officers, rather than the imposition of an additional penalty for conduct which is forbidden to all persons generally when that conduct is committed by a public officer or employee.
As the trial court noted, the legislative history of the statute supports this narrow interpretation.4 Section *661946.12, Stats., was created in its original form in 1953, as a part of a massive revision of Wisconsin’s criminal code. The 1953 draft of the code was adopted with a delayed effective date, and with the proviso that it be ratified by the 1955 legislature before taking effect. Chapter 623, Laws of 1953. As originally enacted sub-see. 946.12(2), then numbered sec. 346.12(2), was arguably broader than its present version because it pertained to any public officer who “[i]n his capacity as such officer or employe, intentionally does an act which is . . . forbidden by law.” The additional requirement that the act be one “which the officer knows he is forbidden by law to do in Ms official capacity” was added at the suggestion of an advisory committee whose revisions of the 1953 draft were largely incorporated into the draft that took effect in 1956.5 Even prior to this narrowing amendment of the subsection, the comment attached to the 1953 draft stated, with respect to the section as a whole:
This is the general section on misconduct in public office; the section includes conduct sometimes treated under the separate headings of malfeasance, misfeasance, nonfeasance, extortion, and oppression. The section deals only with acts done by a public officer or public employe *662in his capacity as such officer or employe. A public officer or employe acts in his capacity as such officer or employe when the acts are done under color of the public office or employment; they are to be distinguished from acts which a public officer or public employe may do in a purely private capacity. [Emphasis supplied.]
Legislative Council of Wisconsin, Comment to Assembly Bill No. 100, A., Assembly of 1953, at 175.
There is no suggestion in the record that the defendant utilized the power of her office in any manner when she had intercourse with the prisoner, or that she committed those acts in any other than a “purely private capacity.” There is no suggestion, for instance, that she threatened sanctions or offered benefits within her power as a public officer to bestow or withhold in order to obtain the prisoner’s consent to the acts. The mere fact that she was on duty when the acts were committed does not, in our judgment, transform private acts of fornication into acts done in an official capacity. Indeed, her conduct was far removed from any duties of the job she held.
Our construction of the term “in his official capacity” as used in sec. 946.12(2), Stats., is guided by the supreme court’s construction of that phrase in other contexts. For example, in State v. Hibicke, 263 Wis. 213, 56 N.W.2d 818 (1953), the supreme court construed a statute prohibiting bribery of public officials with intent to influence the official’s action “upon any . . . matter . . . which may then be pending or which may by law come or be brought before him in his official capacity.” Hibicke was a town constable who solicited money in exchange for exerting his influence with the town board to obtain a trailer-camp license for a person whose application for that license the board had previously denied. The court noted that Hibicke’s duties as a constable did not include the power to grant or to vote *663upon the issuance of such licenses, but only to enforce the town ordinance provisions pertaining to trailer camps. It further noted that any recommendation Hibicke may have made to the board concerning the application in question bore no relation to his duties as a constable, because he had neither an official nor historical responsibility to approve or disapprove such applications.6 It therefore held:
In view of the fact that the constable had no duty with respect to the granting of such a license it would not be bribery for him to take money to attempt to influence the town board any more than it would be bribery for a lawyer, or any other citizen, to accept money for that purpose. It may be a violation of ethics and good conduct for a public officer in such a capacity to me his influence upon a board, but it would not be bribery. [Emphasis supplied.]
263 Wis. 217-189, 56 N.W.2d at 820.
Applying the Hibicke analysis to this case, it may be said that the defendant’s fornication with the prisoner was undoubtedly a violation of ethics and good conduct for a prison guard, and may well have been a violation of disciplinary rules.7 Because that act did not inherently implicate the. power of her public office, however, *664it did not fall within the prohibition of sec. 946.12(2), Stats.
In State v. Barrett, 96 Wis. 2d 174, 291 N.W.2d 498 (1980), the question was whether an on-duty Richland County deputy sheriff who pursued a traffic violator into an adjacent county and there made an arrest was “acting in his official capacity” at the time of the arrest within the meaning of the battery to peace officers statute, sec. 940.205, Stats. (1975).8 In holding that he was not, the supreme court cited as “useful” the test adopted in United States v. Heliczer, 373 F.2d 241, 245 (2d Cir. 1967), cert. denied, 388 U.S. 917 (1967) to interpret a similar federal statute as follows:
‘Engaged in . . . performance of official duties’ is simply acting within the scope of what the agent is employed to do. The test is whether the agent is acting within that compass or is engaging in a personal frolic of his own. . . . [Emphasis supplied.]
96 Wis. 2d at 180, 291 N.W.2d at 500, quoting Heliczer, 373 F.2d at 245. The Barrett court held:
Once [the deputy] crossed the county line, unless his purpose is questioning and detaining the defendant, had some relation to his employment as a deputy in Richland county, he was no longer acting in his official capacity [sic]. By the phrase “some relation to his employment,” we mean that he must be acting as a peace officer, that is, he must be doing “police work” and he must be acting with the powers vested in him as a peace officer. [Emphasis supplied.]
96 Wis. 2d at 180-81, 291 N.W.2d at 501.
*665We conclude that the defendant in this case was not acting in her capacity or with powers vested in her as a prison guard but was rather, in the words of the Heliczer court, engaged in a “personal frolic” of her own when she had intercourse with the prisoner. This being so, her conduct — although it was illegal as a misdemeanor under the fornication statute9 — was not proscribed by sec. 946.12(2), Stats., and was thus not punishable as a felony under that statute.
The state urges that this construction of the official capacity requirement renders the statute meaningless, since doing an act forbidden by law would never fall within the scope of what the person was employed and empowered to do. We reject this assertion. As the Barrett court .noted, illegal actions (such as arrests without probable cause in that case) may fall within the official capacity of the officer if those acts are inherently related to the duties of the office in question. 96 Wis. 2d at 181, 291 N.W.2d at 501. Had the defendant offered benefits or threatened sanctions within her control as a prison guard in order to obtain the prisoner’s consent to the intercourse, for example, her conduct in so doing might well be punishable as “misconduct in public office” under subsection (2) of sec. 946.12, Stats. Absent any material connection between the forbidden act and the public office, however, that statute does not apply.
By construing the statute to cover the act in question, as the state urges, this court would violate firmly established rules of construction and subject the statute to constitutional attack on grounds of due process. We are *666required to construe penal statutes strictly in favor of the accused.
[I]n construing and applying statutes claimed to impose criminal liability — “if the acts alleged do not come clearly within the prohibition of the statute, its scope will not be extended to other offenses than those which are clearly described and provided for, and if there is a fair doubt as to whether the act charged is embraced in the prohibition, that doubt is to be resolved in favor of the defendant.”
State ex rel. Dinneen v. Larson, 231 Wis. 207, 217, 284 N.W. 21, 26 (1939), quoting Walter W. Oeflein, Inc. v. State, 177 Wis. 394, 396-97, 188 N.W. 633, 634 (1922). [5]
We are also required to construe statutes so as to avoid an unconstitutional result. Jankowski v. Milwaukee County, 104 Wis. 2d 431, 439, 312 N.W.2d 45, 49 (1981). The trial court did not reach the defendant’s challenge to the statute on grounds of vagueness because it erroneously believed that State v. Tronca, 84 Wis. 2d 68, 267 N.W.2d 216 (1978), had disposed of that issue.10 A statute is unconstitutionally vague if it fails to give “reasonable notice of the prohibited conduct to those who would avoid its penalties.” Tronca, 84 Wis. 2d at 86, 267 N.W.2d at 224, quoting Ryan v. State, 79 Wis. 2d 83, 90, 255 N.W.2d 910, 914 (1977). It must not be “so obscure that persons of common intelligence must necessarily guess at its meaning and differ as to its applicability.” Tronca, 84 Wis. 2d at 86, 267 N.W.2d at 224.
*667The constitutional requirement of definiteness is violated by a criminal statute that fails to give a person of ordinary intelligence fair notice that his contemplated conduct is forbidden by the statute. The underlying principle is that no man shall be held criminally responsible for conduct which he could not reasonably understand to be proscribed.
United States v. Harriss, 347 U.S. 612, 617 (1954), quoted with approval in State v. Kort, 54 Wis. 2d 129, 137 n 12,194 N.W.2d 682, 687 n 12 (1972).
The defendant is, of course, presumed to have known that her acts of intercourse with a person not her husband were illegal under the clear prohibition of the fornication statute then in effect, and were therefore punishable as Class A misdemeanors. Whether sec. 946.12(2), Stats., gave her notice that those acts were also punishable as Class E felonies if she committed them with a prisoner and while on duty is entirely another question, and one which we need not reach in this opinion in light of our holding.
By the Court. — Order affirmed.
The record does not reveal how these acts came to the attention of the prosecuting authorities.
Only the italicized portions of the subsection are at issue in this case. The state makes no claim that the defendant’s alleged acts were “in excess of [her] lawful authority.”
Section 944.15, Stats., was repealed and recreated by 1983 Wis. Legis. Serv. Act 17 (West). Under the present section fornication by adults is illegal only if committed in public.
We reject the dissent’s suggestion that we are precluded from consulting the legislative history of the statute because its meaning is plain on its face. It meaning is far from plain because its language suggests a variety of interpretations. Among the possible classes of persons who might arguably be said to fall within the scope of the statute are the following:
1. Any public official who commits an act “he knows he is forbidden by law to do.”
2. Any public official who commits a crime.
3. Any public official who commits a crime while on duty.
The first, and broadest, of these possible readings would seem to apply to such acts as running a red light or violating a zoning ordinance, in addition to acts forbidden by the criminal code. The second and third interpretations, which the dissent seems to accept, would seem to apply to such crimes as murder, child abuse, and the like, regardless whether there was any connection between the crime and the public office.
*661Aside from the fact that the legislature, had it intended any of the three possible prohibitions suggested above, could have stated that intent as simply as we did, these interpretations ignore the narrowing effect of the statute’s requirements that the acts be both committed and forbidden in the “official capacity” of the actor. In order to ascertain the perimeters of the limitation the legislature intended these words to have, we may resort to extrinsic aids such as legislative history and the rules of statutory construction. State v. Stepniewski, 105 Wis. 2d 261, 268, 314 N.W.2d 98, 101 (1982); Wirth v. Ely, 93 Wis. 2d 433, 441, 287 N.W.2d 140, 144 (1980).
See Minutes of Meeting of the Criminal Code Advisory Committee, Legislative Council, November 13, 1954, p. 9-10. (On file, Wisconsin Legislative Reference Library.)
Cf. State v. Tronca, 84 Wis. 2d 68, 267 N.W.2d 216 (1978) which held that the exercise of an informal “aldermanie privilege” to approve or disapprove the issuance of liquor licenses was an act within the alderman’s official capacity because it had been recognized by long-standing custom and usage even though it was not a power specifically conferred upon the office. See also, generally, Annot., 73 A.L.R 374 (1976).
The state has abandoned on appeal its position before the trial court that the defendant’s violation of administrative work rules promulgated by the Department of Health and Social Services constituted an act “forbidden by law” within the meaning of sec. 946.12 (2), Stats.
Section 940.206, Stats. (1975), was repealed and recreated by ch. 173, Laws of 1977, as sec. 940.20(2), which provides:
Whoever intentionally causes bodily harm to a law enforcement officer ... , as those terms are defined in s. 102.475(8) (a) and (c), acting in an official capacity and the person knows or has reason to know that the victim is a law enforcement officer ... , by an act done without the consent of the person so injured, is guilty of a Class D felony.
The record does not disclose why the defendant was charged with felony misconduct in office rather than with fornication in violation of sec. 944.15, Stats. (1981-82).
State v. Tronca, 84 Wis.2d 68, 267 N.W.2d 68, 216 (1978), upheld subsection (3) of sec. 946.12, Stats., against a vagueness challenge. Subsection (5) was similarly upheld in State v. Ryan, 79 Wis. 2d 83, 255 N.W.2d 910 (1977). The constitutionality of subsection (2), however, has never been determined in a published case.