The chief and other police officers of all cities and towns shall have all the powers and duties of constables except serving and executing civil process. They shall suppress and prevent all disturbances and disorder. They may carry within the commonwealth such weapons as the chief of police or the board or officer having control of the police in a city or town shall determine; provided, that any law enforcement officer of another state or territory of the United States may, while on official business within the commonwealth, carry such weapons as are authorized by his appointing authority. They may examine all persons abroad whom they have reason to suspect of unlawful design, and may demand of them their business abroad and whither they are going; may disperse any assembly of three or more persons, and may enter any building to suppress a riot or breach of peace therein. Persons so suspected who do not give a satisfactory account of themselves, persons so assembled and who do not disperse when ordered, and persons making, aiding and abetting in a riot or disturbance may be arrested by the police, and may thereafter be safely kept by imprisonment or otherwise unless released in the manner provided by law, and taken before a district court to be examined and prosecuted.
Whoever is arrested and charged with any offense committed during a riot, disturbance or mass demonstration may be fingerprinted, in accordance with the protocol of the identification system of the department of the state police and may be photographed.
If a police officer stops a person for questioning pursuant to this section and reasonably suspects that he is in danger of life or limb, he may search such person for a dangerous weapon. If he finds such weapon or any other thing the possession of which may constitute a crime, he may take and keep it until the completion of the questioning, at which time he shall return it, if lawfully possessed, or he shall arrest such person.
Mass. Gen. Laws ch. 41, § 98