The uncommon speed of the bill was a marked shift for the Legislature, which often moves at a deliberative and sometimes glacial pace, but lawmakers said outrage over a Supreme Judicial Court ruling the day before spurred the quick action.
"It is sexual harassment. It's an assault on another person," Senate President Therese Murray was quoted as saying by The Boston Globe.
"Women and children should be able to go to public places without feeling that they are not protected by the law," Murray said.
Speaker Robert A DeLeo said the court's decision demanded a law banning what he described as such "abhorrent" activity.
Also Read
"We can send a message out there, to the women especially, that this type of action will not be tolerated - now will be illegal under Massachusetts law," he said.
The bill was sent yesterday night to Governor Deval Patrick and an aide said he would sign it.
Michael Robertson was charged under the state's criminal voyeurism law, which was written before cellphone cameras were in wide use.
In its unanimous ruling, the Supreme Judicial Court said prosecutors did not prove he violated two key aspects of the law.
They failed to prove the women were photographed while nude or partially nude and that they had a reasonable expectation of privacy.
"Because the MBTA is a public transit system operating in a public place and uses cameras, the two alleged victims here were not in a place and circumstance where they reasonably would or could have had an expectation of privacy," the court said.
Under the bill, it would be a misdemeanour to take secret photos and videos of "the sexual or other intimate parts of a person under or around the person's clothing."
The law would apply to times when a "reasonable person" would believe those parts of their body would not be publicly visible. Distributing those images could lead to felony charges and prison time.