
96 Wis.2d 174 (1980)
291 N.W.2d 498
STATE of Wisconsin, Plaintiff in error-Petitioner,
v.
Ronnie Lee BARRETT, Defendant in error.
No. 77-641.
Supreme Court of Wisconsin.
Argued April 1, 1980.
Decided May 6, 1980.
*175 For the plaintiff in error-petitioner there were briefs by Bronson C. La Follette, attorney general, and Edward S. Marion, assistant attorney general, and oral argument by Michael Klos, assistant attorney general.
For the defendant in error the cause was argued by Ruth S. Downs, assistant state public defender, with whom on briefs were Howard B. Eisenberg, former state public defender, and Richard L. Cates, state public defender.
Originally reported in 89 Wis.2d 367, 280 N.W.2d 114.
DAY, J.
Ronnie Lee Barrett, the defendant, was charged with battery to a peace officer pursuant to sec. 940.205, Stats. 1975.[1] At the conclusion of the preliminary *176 examination, the county court of Richland county found that there was probable cause to believe that the defendant committed the crime charged. Thereafter, the defendant filed a motion to dismiss the prosecution. The circuit court hearing the motion, ordered that the complaint be dismissed. On appeal by the State the court of appeals affirmed, finding that the officer was not acting in his official capacity when the crime was alleged to have occurred.
At issue is whether a county deputy sheriff acted "in his official capacity" as that term is used in sec. 940.205, Stats. 1975 [now sec. 940.20(2), Stats. 1977] when taking into custody an individual in a county other than that of his appointment, on a charge of resisting or obstructing an officer by refusing to identify himself. We agree with the court of appeals, that the deputy sheriff was not acting in his official capacity, a necessary element of the crime of battery to a peace officer or fireman, when he took the defendant into custody. We therefore affirm.
On July 28, 1977, William Breneman, a deputy sheriff for Richland county, in uniform and on duty, observed an automobile being operated in Richland county without license plates, in violation of the state motor vehicle code. Officer Breneman followed the automobile into neighboring Grant county, where he stopped it. He asked the driver of the car for his driver's license, but the driver said that he did not have it with him. Officer Breneman then asked the defendant, who was a passenger in the car, for his name and date of birth. The defendant refused to answer stating that he was not driving and that he had not done anything wrong. The defendant was told that if he did not answer, he would be arrested for *177 resisting or obstructing an officer. Sec. 946.41, Stats. 1975.[2] Breneman escorted the defendant back to his squad car and while attempting to handcuff him, the defendant struck him. The defendant was subsequently *178 charged with battery to a peace officer, a felony. Sec. 940.205, Stats. 1975.
[1]
The elements of the crime of battery to a peace officer or fireman were enumerated by this Court in State v. Caruso, 44 Wis.2d 696, 703, 172 N.W.2d 195 (1969). They are as follows:
"(1) Causing bodily harm to a peace officer or fireman;
"(2) The peace officer or fireman is acting in his official capacity;
"(3) Where the person knows or has reason to know that the victim is a peace officer or fireman;
"(4) Where the act is done with intent to cause bodily harm;
"(5) Without the consent of the person so injured."
The term "peace officer" as that term is used in this statute means ". . . any person vested by law with a duty to maintain public order or to make arrests for crime, whether that duty extends to all crimes or is limited to specific crimes." Sec. 939.22(22), Stats. It is not disputed that Officer Breneman was a peace officer when on duty in Richland county. The defendant, however, has raised a question regarding whether Officer Breneman remained a peace officer when he entered Grant county. There is little merit to this argument. Officer Breneman did not cease to be a peace officer when he left the county in which he was deputized. His status as a peace officer continued wherever he happened to be or regardless of what he was doing so long as he was properly vested by law with the title, rights, and duties of a deputy sheriff for Richland county. Whether he was acting lawfully or in his official capacity at any particular moment are separate questions, distinct from any issue of his status as a peace officer.
Given our decision that the term "peace officer" merely denotes status, the remaining arguments of the parties *179 focus on the second element of the crime of battery to a peace officer or fireman, namely that the peace officer be "acting in his official capacity" when he was injured. The State argues that an act performed in the peace officer's official capacity is an act which is committed while the officer is engaged in police activity, "i.e., in the public interest." The State perceives no difference between an arrest made by a deputy sheriff which is unlawful because probable cause did not exist when the arrest was made, and custodial detention by a deputy sheriff undertaken while beyond the geographical bounds of his home county, and in the absence of any rule extending his power to act as a peace officer in another county.
The State concedes for the purposes of this argument that Officer Breneman "had no legal right or duty to perform any police functions in Grant County" at the time he took the defendant into custody.[3] Whether there existed probable cause for the arrest of the defendant on the charge resisting or obstructing an officer is not at issue in this case.
[2, 3]
This court has never explicitly adopted a particular test to determine whether a peace officer or fireman is acting in his official capacity as that term is used in sec. 940.205, Stats. 1975. However, this court in Williams v. State, 45 Wis.2d 44, 172 N.W.2d 31 (1969), did refer to the decision in United States v. Heliczer, 373 F.2d 241, 245 (2d Cir.) cert. denied, 388 U.S. 917 (1967), which interpreted the phrase "official duties" *180 in a federal statute proscribing assaults upon federal narcotics officers.[4] The court in Heliczer stated:
"`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. It cannot be said that an agent who has made an arrest loses his official capacity if the arrest is subsequently adjudged to be unlawful." 373 F.2d at 245.
We believe that this test is useful in determining whether a police officer is acting in his official capacity under sec. 940.205, Stats., and as such, we hereby adopt that test. The State does not in fact dispute the appropriateness of using this test. It argues instead that a deputy sheriff is employed to make arrests for obstructing police officers, and even when such an arrest is made without a legal right or duty, it is still within the scope of that which he is employed to do.
[4]
However, there exists a distinction between an unlawful arrest because probable cause did not exist at the time the defendant was taken into custody (the situation in Heliczer) and the situation presented here. The deputy sheriff in this case was not performing any of the duties conferred upon him as a deputy sheriff of Richland county when he questioned the defendant in Grant county. Once he 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. *181 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. In this case, Officer Breneman must not only have been questioning the defendant as a deputy sheriff but he must also have been acting with the powers of a deputy sheriff for Richland county. If a deputy sheriff crosses the county line of his employment and if there are no circumstances of his employment extending his duty to act, then the attempt to exercise his powers as a peace officer outside of his county of employment is not within the scope of his employment.
We express no opinion regarding the lawful authority of a deputy sheriff to act either within or outside of his county and to make arrests or carry out the duties of his employment outside his county. As is rightly pointed out by the State, the existence of a peace officer's lawful authority is an element of the crime of resisting or obstructing an officer under sec. 946.41, Stats. It is not an element of the crime of battery to a peace officer. Lawful authority goes to whether the officer's actions are conducted in accordance with the law. This determination is not the same as that which is made in construing whether a peace officer acts in his official capacity. Actions taken without lawful authority may still be within an officer's official capacity. This would be true, if for example, Officer Breneman arrested the defendant in Richland county but without probable cause. Likewise, the converse is also true. An officer may be acting beyond his official capacity but with lawful authority. An example of this situation would be where the officer was off duty in another county and witnessed a crime for which he lawfully could make an arrest. See, Radloff v. National Food Stores, Inc., 20 Wis.2d 224, 237(a) (b), 121 N.W.2d 894 (1963).
*182 [5]
What we are dealing with here, is whether the actions of Officer Breneman had any relation to his official capacity as an officer of Richland county. For this we refer to sec. 59.24, Stats. 1975, which provides:
"59.24. Peace maintenance; powers and duties of peace officers, co-operation. (1) Sheriffs and their under-sheriffs and deputies shall keep and preserve the peace in their respective counties and quiet and suppress all affrays, routs, riots, unlawful assemblies and insurrections, for which purpose, and for the service of processes in civil or criminal cases and in the apprehending or securing any person for felony or breach of the peace they and every coroner and constable may call to them and such persons of power of their county as they may deem necessary.
"(2) County law enforcement agencies may request the assistance of law enforcement personnel or assist other law enforcement agencies provided in ss. 66.305 and 66.315."
Officer Breneman was hired to act as a deputy sheriff in Richland county. His duties, unless extended by some other rule not applicable here, are limited by the confines of sec. 59.24, Stats. A deputy sheriff does not act in his official capacity wherever he engages in "police activity." Such a broad rule is not warranted by the statutory language. His capacity to act as a peace officer is limited by this statute to keeping the peace in the county of his appointment. When Officer Breneman demanded identification from the defendant and then took the defendant into custody, he was not attempting to keep peace in Richland county. The deputy sheriff therefore was not acting in his official capacity at that time.
Therefore, based on the facts of this case, a violation of section 940.205, Stats. 1975, was not established, and the complaint was properly dismissed.
By the Court.  The decision of the court of appeals is affirmed.
NOTES
[1]  Section 940.205, Stats. 1975, reads as follows: Battery to peace officers; firemen. Whoever causes bodily harm to a peace officer, as defined in s. 939.22(22), or fireman, acting in his official capacity and the person knows or has reason to know that the victim is a peace officer or fireman, by an act done with intent to cause bodily harm to the peace officer or fireman, without consent of the person so injured, may be imprisoned not more than 2 years."

This statute was repealed by 1977 Wisconsin Laws, Ch. 173, sec. 14 and recreated in sec. 940.20(2), Stats., which reads as follows:
"940.20. Battery; special circumstances. . . . battery to peace officers and fire fighters. Whoever intentionally causes bodily harm to a peace officer, as defined in s. 939.22(22), or fire fighter, acting in an official capacity and the person knows or has reason to know that the victim is a peace officer or fire fighter, by an act done without the consent of the person so injured, is guilty of a Class E felony."
[2]  Section 946.41, Stats. 1975, reads as follows:

"946.41. Resisting or obstructing officer. (1) Whoever knowingly resists or obstructs an officer while such officer is doing any act in his official capacity and with lawful authority, may be fined not more than $500 or imprisoned not more than one year in county jail or both.
"(2) In this section:
"(a) `Officer' means a peace officer or other public officer or public employe having the authority by virtue of his office or employment to take another into custody.
"(b) `Obstructs' includes without limitation knowingly giving false information to the officer with intent to mislead him in the performance of his duty including the service of any summons or civil process.
"(3) Whoever by violating this section hinders, delays or prevents an officer from properly serving or executing any summons or civil process, is civilly liable to the person injured for any actual loss caused thereby and to the officer or his superior for any damages adjudged against either of them by reason thereof.
This statute was amended by 1977 Wisconsin Laws, Ch. 173, sec. 130 to read:
"946.41. Resisting or obstructing officer. (1) Whoever knowingly resists or obstructs an officer while such officer is doing any act in an official capacity and with lawful authority, is guilty of a Class A misdemeanor.
"(2) In this section:
"(a) `Officer' means a peace officer or other public officer or public employe having the authority by virtue of his office or employment to take another into custody.
"(b) `Obstructs' includes without limitation knowingly giving false information to the officer with intent to mislead him in the performance of his duty including the service of any summons or civil process.
"(3) Whoever by violating this section hinders, delays or prevents an officer from properly serving or executing any summons or civil process, is civilly liable to the person injured for any actual loss caused thereby, and to the officer or his superior for any damages adjudged against either of them by reason thereof."
[3]  We do not equate the phrase "legal right or duty" as being the same as either official capacity or lawful authority. We do consider this to be a concession by the State that the power of Officer Breneman to act as a peace officer, under the facts of this case, was not extended by any statute or rule that would allow him to act as a peace officer in Grant county.
[4]  The Heliczer test has been applied in other federal cases in interpreting similar provisions in various federal statutes. See, e.g., United States v. Smith, 562 F.2d 454 (7th Cir. 1977), cert. denied, 434 U.S. 1072 (1978); United States v. Cunningham, 509 F.2d 961, 963 (D.C. Cir. 1975); United States v. Martinez, 465 F.2d 79 (2d Cir. 1972); United States v. Reid, 517 F.2d 953 (2d Cir. 1975).
