Section 1. If five or more persons, being armed with clubs or other dangerous weapons, or if ten or more persons, whether armed or not, are unlawfully, riotously or tumultuously assembled in a city or town, the mayor and each of the aldermen of such city, each of the selectmen of such town, every justice of the peace living in any such city or town, any member of the city, town, or state police and the sheriff of the county and his deputies shall go among the persons so assembled, or as near to them as may be with safety, and in the name of the commonwealth command all persons so assembled immediately and peaceably to disperse; and if they do not thereupon immediately and peaceably disperse, each of said magistrates and officers shall command the assistance of all persons there present in suppressing such riot or unlawful assembly and arresting such persons. For the purposes of this section, the University of Massachusetts at Amherst shall be considered to be a town.