A law in New York that removed religious exemptions to vaccines for children attending school will remain in effect, at least for now, after a state judge in Albany said she wasn't persuaded by claims that the state Legislature acted with hostility toward religious groups.

Albany County Supreme Court Justice Denise Hartman wrote in the decision that, at this point, the health risk to individuals who aren't vaccinated outweighed the claims brought against the law.

"The court is hard-pressed to conclude that plaintiffs have shown that the balance of equities tips decidedly in their favor," Hartman wrote. "Just as the court cannot overstate the potential harm to plaintiffs if the injunction is denied, the court cannot overstate the potential harm to unvaccinated individuals if the injunction is granted."

Attorneys Michael Sussman and Robert F. Kennedy Jr. argued before Hartman earlier this month that if the injunction is denied, thousands of children will either be forced to get vaccinated against their religious beliefs or not have reasonable access to an education.

Sussman said Monday he plans to appeal the decision to the Appellate Division, Third Department in Albany and will seek a hearing before the panel as soon as possible.

"We will seek a hearing as promptly as possible as we do not agree with Supreme Court's logic and reasoning concerning the possibility of success on the merits or the balancing of equities," Sussman said. "We believe both favor preserving the status quo until final judicial resolution. We remain confident in our arguments."

New York Attorney General Letitia James, whose office defended the law before Hartman, said in a statement that her office was pleased with the decision and will continue its defense of the statute.

"Vaccines ensure the health and safety of our children, our families, and our communities," James said. "This law will help protect New Yorkers from experiencing any additional public health crises, which is why we vigorously defended it."

Assistant Attorney General Helena Lynch argued on behalf of the Attorney General's Office before Hartman earlier this month, during a hearing on the preliminary injunction motion that was packed with opponents of the law.

She used her time before Hartman to stress the legislative history of the law, which was approved after the state's largest outbreak of the measles over the last year. The disease had spread rapidly in areas of Rockland County and New York City.

Lynch argued during the hearing that lawmakers were acting in response to that outbreak, rather than with any sort of animus toward the beliefs of those who've previously sought religious exemptions to vaccines. She also said case law supported the Legislature's authority to promulgate the measure.

Sussman had taken the opposite position during the hearing, claiming that lawmakers had, on more than one occasion, criticized the choices made by parents to forego vaccination because of their religion. The law, he said, was enacted with a hostility toward those individuals and was passed well after the outbreak hit its peak earlier this year.

That was part of a disagreement at the hearing between Sussman and Lynch as to whether the law should be considered a neutral law enacted by the state through its police powers or should be analyzed with strict scrutiny by the court.

As part of his argument for strict scrutiny, Sussman cited last year's U.S. Supreme Court decision in Masterpiece Cakeshop v. Colorado Civil Rights Commission, in which the court ruled that the commission was improperly hostile to a baker who denied a wedding cake to a same-sex couple based on his religious beliefs.

Hartman wrote in her decision that public comments made by lawmakers against parents who choose not to vaccinate their children were not necessarily hostile toward religious groups. Many of those comments may have been directed at those who "disagree with scientific and medical consensus that vaccines are safe and effective," she wrote.

"Skepticism over the genuineness of some claimed religious exemptions does not necessarily equate to hostility toward legitimate religious beliefs," Hartman wrote. "And other legislators' comments may merely express the view that the public health of all children, and the public generally, supersedes even bona fide religious interests."

Hartman also addressed the timing of the legislation in her decision, saying that Sussman's argument wasn't enough to convince her of his claims about their motive.

"Although plaintiffs argue that the legislators' animus is illustrated by the timing of the repeal—which was presented and enacted months after the apex of the measles outbreak—legislative priorities may have made it impractical to address this issue in January when it was addressing the State Budget," Hartman wrote.

Instead, she wrote, lawmakers may have chosen to address the bill in June to give affected families and schools time to plan for the next school year. Enacting the law in January may have caused more disruption.

The lawsuit was brought by Sussman on behalf of more than four dozen families who said they previously obtained a religious exemption to vaccines.

The law bars unvaccinated children from attending school or daycare in New York, meaning they'll have to be homeschooled unless they have a medical exemption. That's not an option for everyone, they've argued, which has put them in a tough spot.

It's unclear if a ruling from the Third Department in Albany on Hartman's decision would come before the deadline children have to meet for vaccination in order to attend school this year.

READ MORE: