(a) Where five or more persons are participating in a course of disorderly conduct in violation of Section 509.01, and there are other persons in the vicinity whose presence creates the likelihood of physical harm to persons or property or of serious public inconvenience, annoyance or alarm, a law enforcement officer or other public official may order the participants and such other persons to disperse. No person shall knowingly fail to obey such order.
(b) Nothing in this section requires persons to disperse who are peaceably assembled for a lawful purpose.