(CNN) -- Massachusetts lawmakers Thursday passed a bill banning "upskirting" in response to a ruling by the state's highest court that said a law aimed at criminalizing voyeurism did not apply to the snapping of secret photos up a woman's skirt.
The bill now goes to Gov. Deval Patrick, who has publicly committed to signing it, his office said Thursday.
The bill would make photographing or recording video under a person's clothing illegal, according to a statement from the office of Senate President Therese Murray.
The act would be made a misdemeanor.
"The House took action today to bring Massachusetts laws up-to-date with technology and the predatory practice of 'upskirting.' We must make sure that the law protects women from these kind of frightening and degrading acts," House Speaker Robert A. DeLeo said in a statement.
Court ruling: Upskirt photos legal
"I am proud of the Senate for taking action today to restore a women's [sic] right to privacy," said Murray. "We are sending a message that to take a photo or video of a woman under her clothing is morally reprehensible and, in Massachusetts, we will put you in jail for doing it. We will need to revisit this law again and again as technology continues to evolve and ensure that we are providing the necessary protections."
The bill was passed one day after the state's highest court ruled that a law did not apply to the taking of secret photos up a woman's skirt.
The ruling stemmed from the case against Michael Robertson, 32, who was arrested in 2010 and accused of using his cell phone to take pictures and record video up the skirts and dresses of women on the trolley, according to court documents.
Two separate complaints were filed against Robertson with the transit police
Authorities then staged "a decoy operation" to catch Robertson, who was eventually arrested and charged with two counts of attempting to secretly photograph a person in a state of partial nudity. Police observed him point a cell phone video camera up the dress of a female officer, court documents state.
Wednesday's ruling reversed a previous decision by a lower court, which had denied a motion by Robertson seeking the dismissal of the case, said a statement from the Suffolk County district attorney's office.
The ruling said that state law "does not apply to photographing (or videotaping or electronically surveilling) persons who are fully clothed and, in particular, does not reach the type of upskirting that the defendant is charged with attempting to accomplish on the MBTA."
The case against Robertson was dismissed on Wednesday after the Massachusetts Supreme Judicial Court ruled in his favor.
"In sum, we interpret the phrase, 'a person who is ... partially nude' in the same way that the defendant does, namely, to mean a person who is partially clothed but who has one or more of the private parts of body exposed in plain view at the time that the putative defendant secretly photographs her," the high court ruled.
Suffolk County District Attorney Daniel Conley called for a rewrite of the law on Wednesday during a press conference.