A Nassau County Supreme Court judge on Friday struck down the county's ban on transgender women and girls playing sports at county-run facilities, dealing a defeat to Republican County Executive Bruce Blakeman whose order sparked a lawsuit from civil rights advocates and outcry from top Democrats across New York.

Justice Francis Ricigliano ruled that Blakeman's February order exceeded his legal authority, and permanently blocked him from enforcing the ban. But Blakeman said the county planned to appeal the decision.

Ricigliano wrote that Blakeman "issued an Executive Order aimed at preventing transgender women from participating in girls' and women's athletics at Nassau County parks, despite there being no corresponding legislative enactment providing the County Executive with the authority to issue such an order."

He said the court found Blakeman "acted beyond the scope of his authority as the Chief Executive Officer of Nassau County."

In a statement, Blakeman said the decision showed a "lack of courage from a judge who didn't want to decide the case on its merits."

"Unfortunately girls and women are hurt by the court," he added. "Nassau County will appeal without much faith in [the] Appellate Division applying the law without far-left doctrine being used to undermine women's sports."

The New York Civil Liberties Union, which brought the suit against the county in March on behalf of a Long Island women's roller derby team, said in a statement that it was "gratified the court has struck down a harmful policy that belongs in the dustbin of history."

“The ruling deals a serious blow to County Executive Blakeman’s attempt to score cheap political points by peddling harmful stereotypes about transgender women and girls," said Gabriella Larios, an NYCLU staff attorney. "We will continue to ensure that the attacks against LGBTQ+ rights that are sweeping the nation will not stand in New York.”

The president of the roller derby team, Curly Fry, said the ruling was "a victory for those who believe that transgender people have the right to participate in sports just like everyone else."

"It sends a strong message that transphobic discrimination cannot stand,” they said. "Trans people belong everywhere, including in sports, and they will not be erased.”

Ricigliano wrote that the plaintiff's arguments that Blakeman's order violated New York's human and civil rights laws were moot because of his permanent injunction.

Last month, a federal court threw out a preemptive lawsuit from Nassau County that sought to head off potential legal action from state Attorney General Letitia James, who along with Gov. Kathy Hochul have slammed the executive order as discriminatory and anti-LGBTQ+. The county said it would also appeal that decision.

On Friday, James called Ricigliano's ruling a "major victory."

"In New York, it is illegal to discriminate against a person because of their gender identity or expression," she said in a post on X. "Thanks to @NYCLU for their work on this case. My office will keep working to ensure every New Yorker is free to be who they are."