A bill aimed at ending bullying has passed in the Republican-controlled Michigan Senate, but ignited a somewhat emotional wave of criticism among Democrats, TIME's Swampland reports.

The staunch opposition stems from the fact that the law allows harassment by teachers and students as long as they can claim their actions are rooted in a "sincerely held religious belief or moral conviction." Those who truly believe homosexuality is wrong, for example, are free to torment classmates consequence-free.

On the floor, Senator Gretchen Whitmer gave a harsh criticism dripping with emotion, WWMT reported.

"You may be able to pat yourselves on the back today and say that you did something," she said. "But in actuality you are explicitly outlining how to get away with bullying," Whitmer said.

In her speech, Whitmer went on to outline the irony in naming the bill "Matt's Safe School Law," after a Michigan teen who committed suicide in 2002 from falling victim to bullying.

Matt's father Kevin Epling told the Detroit Free Press that the law makes him "ashamed" and called it "government-sanctioned bigotry."

The bill's sponsor Republican Sen. Rick Jones told the paper that while the motion "may not be perfect" he believes it's a step in the right direction.

WATCH Sen. Gretchen Whitmer's emotional response:

CORRECTION: A previous version of this piece incorrectly stated that Matt Epling fell victim to anti-gay bullying. The family has since spoken out to note that Matt was simply a victim of bullying and was not gay.