
807 So.2d 106 (2002)
Ernest TILLMAN, Appellant,
v.
STATE of Florida, Appellee.
No. 5D01-83.
District Court of Appeal of Florida, Fifth District.
January 18, 2002.
Rehearing Denied February 22, 2002.
*107 James B. Gibson, Public Defender, and Rosemarie Farrell, Assistant Public Defender, Daytona Beach, for Appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Alfred Washington, Jr., Assistant Attorney General, Daytona Beach, for Appellee.
PLEUS, J.
Tillman appeals from his convictions and sentences for aggravated battery on a law enforcement officer and resisting an officer with violence. He argues that the trial court erred in denying his judgment of acquittal motions because the state failed to prove an essential element of each charge, to wit: that the officer was lawfully engaged in performing a legal duty. He also argues that the court's referral of his restitution obligation to collections court was unconstitutional and violated his due process rights. We affirm.
The facts, taken in the light most favorable to the state, are as follows: Deputy Parks Duncan, Jr., was patrolling the Deerfield Subdivision when he observed 20 to 30 people standing in front of five to six houses including two young males with open alcoholic beverages. Among the group of mostly Hispanic people were five black males standing in the street being loud and boisterous. Duncan approached them and asked them to return to the party. As they left, one of the black males uttered loud obscenities and threatened Officer Duncan.
Due to this threat, Duncan called for back-up. After back-up arrived, Duncan and eight to ten other officers entered the screened pool enclosure at the rear of the house where the party was occurring. At that point, Duncan did not know who the owner of the house was, but entered to "see if I could determine who made this threat to me." As Duncan was telling people to turn the music down and sit down, he heard a commotion behind him. He turned around and saw "a big struggle."
Deputy Timothy Henriquez testified that he responded to Duncan's call for backup. Duncan advised him that he had been threatened by two individuals he recognized as possible bank robbers or robbery suspects. Henriquez and other backup officers followed Duncan to the pool enclosure where Henriquez saw the two gentleman run into the pool enclosure. Duncan pointed out Tillman and Henriquez stopped Tillman inside the pool enclosure. Tillman was wearing a "very heavy jacket" which seemed odd to Henriquez because it was not cold. Henriquez asked Tillman if he could pat him down and Tillman refused, but Henriquez patted him down anyway. Henriquez was concerned about finding weapons on Tillman because he understood that Tillman had threatened Duncan and that Duncan recognized Tillman as having "been accused, or charged at one time or another with armed robbery with weapons." Henriquez did not find any weapons on Tillman.
When he finished patting down Tillman, Henriquez noticed that everyone inside the pool enclosure was sitting down talking to deputies. Henriquez asked Tillman to sit down but Tillman refused, stating that he was not a child, and started to walk away. Henriquez grabbed Tillman's right shoulder, *108 at which point Tillman suddenly spun around and put Henriquez in a headlock. Henriquez attempted to remove himself from Tillman's headlock by dropping to the ground. Just then, other deputies jumped on top of Tillman and Henriquez. Tillman did not release his hold on Henriquez until he was pepper sprayed. When Henriquez stood up, he noticed that his ankle was sore. He later went to the emergency room and had to wear a cast on his leg for six weeks and receive follow-up therapy.
In his defense, Tillman testified that he had been invited to the party by the owner of the house. He was standing in the front yard when a uniformed officer walked up and told everyone to leave or go inside. Tillman walked down the side yard and into the pool enclosure. He did not threaten the officer or hear anyone else do so. Tillman was dancing inside the pool enclosure when he saw three officers enter the pool area. As Tillman attempted to leave, one of the officers stuck his hands inside Tillman's jacket and started to search him. Tillman did not want to be searched and never gave permission to search. However, the officer told Tillman he did not have a choice. After patting him down, Henriquez told Tillman to sit down. Tillman began to tell Henriquez that he was not a kid, but then turned to sit down. As he turned, Henriquez pushed Tillman causing him to stumble. When Tillman turned around, he saw Henriquez coming at him. Tillman put his hands up, Henriquez ran into him, lost his balance and fell to the ground. Two other officers then jumped on top of Tillman and Henriquez. Tillman denied intentionally placing Henriquez into a headlock. Officers handcuffed, pepper sprayed and beat Tillman. The jury convicted Tillman as charged.
Tillman argues that the trial court erred in denying his motion for judgment of acquittal on both counts because the state failed to present prima facie evidence of an essential element of each count, to wit: that the victim was engaged in the lawful execution of a legal duty. Tillman argues that the evidence demonstrated that the officers illegally entered the screened enclosure, illegally patted him down and illegally detained him after the pat down.
The statutes and jury instructions for the crimes charged, battery of a police officer,[1] and resisting an officer with violence,[2] require the state to prove that the officer was lawfully performing or engaged in a duty at the time of the battery or resistance. Numerous cases have acknowledged that this element is essential for both crimes. See, e.g., Nicolosi v. State, 783 So.2d 1095 (Fla. 5th DCA 2001) (essential element of battery on a law enforcement officer is that officer was engaged the in the performance of a lawful duty); Smith v. State, 399 So.2d 70 (Fla. 5th DCA 1981) (essential element of resisting arrest with violence is that officer be engaged in lawful performance of a legal duty).
However, section 776.051(1), Florida Statutes, provides:
A person is not justified in the use of force to resist an arrest by a law enforcement officer who is known, or reasonably appears, to be a law enforcement officer.
We have relied on this statute to hold that:
after July 1, 1975, section 843.01 must be read in pari materia with section 776.051; the end result being that the *109 use of force in resisting an arrest by a person reasonably known to be a law enforcement officer is unlawful notwithstanding the technical illegality of the arrest.
State v. Barnard, 405 So.2d 210 (Fla. 5th DCA 1981), quoting Lowery v. State, 356 So.2d 1325 (Fla. 4th DCA 1978). We have extended the above rule to cover the crime of battery on a law enforcement officer, and to apply to illegal stops, detentions and even illegal contacts. See State v. Giddens, 633 So.2d 503 (Fla. 5th DCA 1994) and State v. Gilchrist, 458 So.2d 1200 (Fla. 5th DCA 1984). See also, State v. Roux, 702 So.2d 240 (Fla. 5th DCA 1997), and Jones v. State, 570 So.2d 433 (Fla. 5th DCA 1990) (no technically illegal arrest in Rouxagent simply walked toward Roux).
Despite these cases, Tillman argues that this court should follow Taylor v. State, 740 So.2d 89 (Fla. 1st DCA 1999). In Taylor, a police officer unlawfully entered the defendant's home to investigate a noise complaint and the defendant shoved him. The defendant was convicted of battery on a law enforcement officer and resisting an officer with violence. Our sister court reversed both convictions, stating that section 776.051(1), Florida Statutes, only applies to cases in which the defendant is charged with resisting arrest, as opposed to resisting some lesser duty, such as a contact, stop or detention. The court acknowledged our prior holdings to the contrary but distinguished its case, stating:
... we do not think that section 776.051(1) can be extended to a situation in which an officer has entered someone's house without any arguable legal justification. An unlawful entry to a person's home is a far greater invasion of privacy than an unlawful arrest or detention on the street.
740 So.2d at 91.
We are not persuaded by Taylor. First, this case is distinguishable from Taylor because the police did not illegally enter Tillman's home; they entered the home of another. Although Tillman was invited to a party at the home, this fact alone does not give him standing to contest the illegality of the police entry.[3]See State v. Suco, 521 So.2d 1100, 1102 (Fla.1988) (distinctions in the law among guests, licensees and invitees ought not to control; rather, the totality of the circumstances must be examined to determine whether a defendant had a reasonable expectation of privacy in the premises searched).
Second, as noted in Dominique v. State, 590 So.2d 1059 (Fla. 4th DCA 1991), if the use of force to resist an arrest is unlawful despite the technical illegality of the arrest,
it logically follows that the use of force would be even less acceptable when a law enforcement officer has merely stopped an individual, since a stop involves less of an invasion of an individual's privacy than does an arrest.
Id. at 1061, fn. 1. In the instant case, Officer Henriquez was not attempting to arrest Tillman; he patted him down and then instructed him to sit down while other officers investigated the threat. Even if the pat down and detention were technically illegal, they were less of an intrusion than an arrest, so Tillman was not justified in using force to resist.
*110 Third, even if the entry, pat down and detention were illegal, once Tillman placed Officer Henriquez in a headlock, Henriquez had probable cause to arrest him. Thus, Tillman's subsequent actions, which resulted in Henriquez suffering a broken ankle, were sufficient to sustain the conviction for battery on a law enforcement officer. See Lennear v. State, 784 So.2d 1181, 1182 (Fla. 5th DCA 2001) (even if initial detention illegal, subsequent resistance with violence gave officer probable cause to arrest and search defendant).
Finally, although we have not addressed the issue of unlawful entry into a home in the context of aggravated battery on a law enforcement officer, we recently addressed the issue in the context of aggravated assault on a law enforcement officer. See Espiet v. State, 797 So.2d 598 (Fla. 5th DCA 2001). In Espiet, a police officer lunged through a screened-in window of the defendant's house in an attempt to arrest him for misdemeanor battery. The officer and defendant ended up on the defendant's dining room floor. The defendant broke away from the officer and returned, pointing a shotgun at the officer. In addition to other charges, the defendant was convicted of aggravated assault on a law enforcement officer and resisting without violence. On appeal, we noted that the state failed to make a prima facie case because the officer illegally entered the defendant's home without a warrant or exigent circumstances, citing Taylor and Payton v. New York, 445 U.S. 573, 100 S.Ct. 1371, 63 L.Ed.2d 639 (1980). Despite this fact, we affirmed the conviction for aggravated assault upon a law enforcement officer following our decision in Barnard. Therefore, we hold that while the state must prove that the alleged victim was a law enforcement officer who was engaged in the lawful execution or performance of a legal duty, the technical illegality of that action does not justify resisting with violence or battering the officer.
Tillman's final argument, regarding the imposition of the collections court program, was not preserved for appeal.
AFFIRMED.
PETERSON and GRIFFIN, JJ., concur.
NOTES
[1]  § 784.07, Fla. Stat. (1997); Fla. Std. Jury Instr. (Crim). 1412, 1447.
[2]  § 843.01, Fla. Stat. (1997).
[3]  The concept of standing generally applies to attempts to suppress evidence under the Fourth Amendment. See Rakas v. Illinois, 439 U.S. 128, 143, 152, 99 S.Ct. 421, 58 L.Ed.2d 387 (1978). It is also helpful here. The Taylor holding rests on the fact that entry into a defendant's home was a "far greater invasion of privacy" than a stop on the street. It is also a far greater invasion of privacy than this case, where Tillman was a casual visitor, not the owner of the home.
