The State of Florida appeals the trial court’s order dismissing its delinquency petition charging Appellee, A.R.R., a juvenile, with one count of resisting a law enforcement officer with violence and three counts of battery on a law enforcement officer.1 The State asserts that the trial court erred in its finding that the law enforcement officers were not in the performance of a legal duty. We agree and reverse.
According to the State, Appellee’s mother reported to the Citrus County Sheriffs Department that the then twelve-year-old Appellee was involved in sexual activity with another juvenile. In response, two deputies went to Appellee’s home and, with her mother’s consent, went inside to speak with Appellee. During the course of that discussion, Appellee became very upset with the deputies and her mother. She began screaming and became highly agitated. Ultimately, her behavior led the lead deputy to believe, based on his experience and training, that if he left Appellee alone with her mother, the situation would *944escalate into a physical altercation. After trying to calm Appellee without success, the deputy reached out to take Appellee by the arm and guide her to a chair. She responded by kicking him. The deputy then handcuffed Appellee, and placed her under arrest. When the two deputies, along with a third deputy called to the scene, attempted to place Appellee in the rear of a caged vehicle, she bit and kicked at them, and was ultimately secured with a hobble strap.
The State charged Appellee with one count of resisting a law enforcement officer with violence and three counts of battery on a law enforcement officer. Appel-lee filed a motion to dismiss, alleging that the deputies were not engaged in the performance of a legal duty when they used force to restrain or arrest her, a required element of both charged offenses. The trial court granted the motion, and dismissed all four counts against Appellee.
A motion to dismiss should be granted only when, viewed in the light most favorable to the State, the undisputed material facts are insufficient to establish a prima facie case of the charged offense.2 State v. Norwood, 66 So.3d 388, 388 (Fla. 5th DCA 2011). Motions to dismiss criminal charges are treated like summary judgment motions in civil cases, the purpose of which is to test the legal sufficiency of the underlying case. State v. Kalogeropolous, 758 So.2d 110, 111 (Fla. 2000); State v. Siegel, 778 So.2d 426, 427 (Fla. 5th DCA 2001). The defendant bears the burden of establishing that there are no material issues of disputed fact and that the facts do not establish a prima facie case of guilt. Kalogeropolous, 758 So.2d at 111.
To convict a defendant for battery of a law enforcement officer and resisting an officer with violence, the State must prove that the officer was engaged in the lawful performance or the execution of a legal duty.3 Tillman v. State, 934 So.2d 1263, 1266 (Fla.2006), superseded by statute on other grounds, § 776.051(1), Fla. Stat. (2008); Eastes v. State, 960 So.2d 873, 876 (Fla. 5th DCA 2007). In determining whether the State pled sufficient facts to establish this element, not defined by either statute, trial courts should rely on the statutory and decisional law governing the particular duty in which the officer is engaged at the point that the resistance occurs. C.E.L. v. State, 24 So.3d 1181, 1186 (Fla.2009); Sinquefield v. State, 1 So.3d 370, 372 (Fla. 2d DCA 2009); Davis v. State, 973 So.2d 1277, 1279 (Fla. 2d DCA 2008).
An officer is engaged in the performance of his official duties when acting within the scope of his employment. United States v. Heliczer, 373 F.2d 241, 245 (2nd Cir.1967); Clinton v. State, 421 So.2d 186, 188 (Fla. 2d DCA 1982)-. In Florida, “[t]he ... duties ... of state.and county officers shall be fixed by law.” Art. II, § 5(c), Fla. Const. Section 30.15(1), Florida Statutes (2011), states, in relevant part, that “[s]heriffs, in their respective counties, in person or by deputy, shall .... (e) [b]e conservators of the peace in them counties.” “In our complex society, police *945are charged with the duty to protect people and property, wherever they are situated, under a variety of circumstances.”4 Ortiz v. State, 24 So.3d 596, 607 (Fla. 5th DCA 2009) (Torpy, J., concurring). “In performing this duty, they are required to protect against crime without waiting for it to occur.” United States v. Markland, 635 F.2d 174, 176 (2d Cir.1980).
Here, the deputies were within their authority in responding to Appellee’s mother’s call, alleging sexual activity by the twelve-year-old child. Once inside the home, the situation evolved, requiring the deputy to grab Appellee’s arm in order to prevent her from assaulting her mother. See F.J.R. v. State, 922 So.2d 308, 310 (Fla. 5th DCA 2006) (holding that for reasons of public and personal safety, police officers need to be able to keep reasonable control over certain situations). Viewed in the light most favorable to the State, the deputy was in the lawful performance of a legal duty. Thus, the State established a prima facie case of resisting a law enforcement officer with violence against Appellee for purposes of withstanding a dismissal of the delinquency petition.
In addition, after Appellee was handcuffed, she had further physical contact with the deputies as they attempted to place her in a car to transport her. The trial court’s order only parenthetically refers to the additional incidents in its findings, noting, “[t]he two [sic] additional charges of battery on Law Enforcement Officers allegedly occurred after the child was arrested and placed in patrol vehicles.” However, the order dismisses all four counts, including the three charges based on Appellee’s violence after being arrested. This is clear error. A person is not entitled to use physical force to contest even an illegal arrest. See § 776.051(1), Fla. Stat. (2011); Jones v. State, 570 So.2d 433, 435 (Fla. 5th DCA 1990). Appellee committed the subsequent violence on the deputies in response to their attempt to arrest her. Hence, even if her arrest was illegal, Appellee was not justified in using force against the deputies.
For these reasons, we reverse the trial court’s order dismissing the delinquency petition and remand for further proceedings.
REVERSED and REMANDED.
PALMER and BERGER, JJ., concur.. An order of dismissal is reviewed de novo. State v. Shuler, 988 So.2d 1230, 1231 (Fla. 5th DCA 2008).
. Appellee brought her motion to dismiss pursuant to Florida Rule of Juvenile Procedure 8.085(a)(2), which is analogous to Florida Rule of Criminal Procedure 3.190(b). Flence, caselaw applying rule 3.190(b) is instructive. See B.M. v. State, 915 So.2d 649, 651 (Fla. 2d DCA 2005); State v. C.H., 747 So.2d 450, 451 (Fla. 4th DCA 1999). However, the supreme court has expressly held that the procedural remedies available in rule 3.190(d) are not available in juvenile proceedings as the juvenile rules provide greater flexibility to the court and the parties. D.K.D. v. State, 470 So.2d 1387, 1389 (Fla.1985).
. These duties are "functionally identical.” C.M.M. v. State, 983 So.2d 704, 705 n. 1 (Fla. 5th DCA 2008).
. Judge Torpy went on to explain:
Police officers wear many hats: criminal investigator, first aid provider, social worker, crisis intervener, family counselor, youth mentor and peacemaker, to name a few. They are charged with the duty to protect people, not just from criminals, but also from accidents, natural perils and even self-inflicted injuries. We ask them to protect our property from all types of losses— even those occasioned by our own negligence. They counsel our youth. They quell disputes between husband and wife, parent and child, landlord and tenant, merchant and patron and quarreling neighbors. Although they search for clues to solve crime, they also search for missing children, parents, dementia patients, and occasionally even an escaped zoo animal.
Ortiz v. State, 24 So.3d 596, 607 n. 5 (Fla. 5th DCA 2009) (Torpy, J., concurring)(emphasis added).