A state Supreme Court justice in Albany on Friday denied an effort to temporarily block a law that ends the religious exemption for vaccinations, attorney Michael Sussman wrote in a post on Facebook.

Sussman, along with longtime anti-vaccine activist Robert F. Kennedy, announced a lawsuit this week that challenged the law, approved last month amid a measles outbreak of more than 1,000 cases.

Many of the measles cases have been reported in Brooklyn and Rockland County and within the Orthodox Jewish community.

“This is not the decision I had hoped for, but I recognize that getting a TRO (temporary restraining order) against state legislation is very difficult,” Sussman said. “I hope that further development of all the issues will cause this or another Judge to preliminarily restrain the operation of this statute and I will be working on making that happen.”

Opponents of the measure argue the law violates constitutional rights. Public health officials roundly agree that vaccinations are essential for healthy people in order to create herd immunity and prevent the spread of diseases.