AUSTIN, Texas – A federal judge in Texas is blocking for now the Obama administration’s directive to U.S. public schools that transgender students must be allowed to use the bathrooms and locker rooms consistent with their chosen gender identity.

But advocates in Maine say the ruling is not likely to have any impact here because the state’s Human Rights Act and a 2014 court case already affirmed the rights of transgender individuals.

Hundreds of school districts Monday woke up to news of the order by U.S. District Judge Reed O’Connor on the first day of class in Texas and elsewhere. The decision dated Sunday comes after Texas and 12 other states challenged the Obama directive as unconstitutional during a hearing in Fort Worth last week. It applies to schools nationwide, as many districts reopen this week after the summer vacation.

Texas Attorney General Ken Paxton, a Republican, immediately cheered the decision.

“This president is attempting to rewrite the laws enacted by the elected representatives of the people, and is threatening to take away federal funding from schools to force them to conform,” Paxton said. “That cannot be allowed to continue, which is why we took action to protect states and school districts.”

O’Connor is a reliably conservative judge who has often ruled similarly in other civil rights cases involving gay rights, including attempts to deny same-sex couples in Texas the right to marry even after the U.S. Supreme Court issued its ruling affirming same-sex marriage nationwide.

Maine Gov. Paul LePage was among those who signed the Texas lawsuit back in May, although the governor joined the suit in his individual capacity, not on behalf of the state. His office said at the time that the president was “dictating by fiat and governors are pushing back.” LePage had previously joined other Republican officials in a similar case last December in Virginia, where state leaders sought to block a transgender boy’s challenge of his school’s bathroom policy. In that case, an appeals court has sided with the boy.

Maine’s Human Rights Act protects against discrimination, including against transgender individuals. In 2014, the state’s supreme court ruled in favor of Nicole Maines, an Orono girl who sued that school district after she was told she needed to use the bathroom that matched her gender at birth. Maines was born a boy but has identified as a girl for nearly all of her life.

LePage’s office did not immediately respond to a request for comment Monday on the Texas ruling.

Democrats and others have criticized LePage for inserting himself into the debate, which they say has already been settled in Maine.

“The first thing to note is that Maine students are protected under Maine law. This injunction has no effect on them,” said Zach Heiden, legal director for the American Civil Liberties Union of Maine. “But I’m very concerned that this ruling sends a message that it’s acceptable to bully and abuse students who are transgender.”

Matt Moonen, executive director of Equality Maine, agreed that the recent decision has no impact in Maine and said he expects it to be appealed.

“We’re not concerned that our law is going to change in Maine and we’ve proven that we have a majority of voters on our side,” Moonen said Monday. “But I don’t think it’s productive for folks to fixate on this issue when we have actual problems.”

The federal government told U.S. public schools in May that transgender students must be allowed to use bathrooms and locker rooms consistent with their chosen gender identity. That announcement came days after the Justice Department sued North Carolina over a state law that requires people to use public bathrooms that correspond with the sex on their birth certificate, which U.S. Attorney General Loretta Lynch had likened to policies of racial segregation. Republicans have argued such laws are commonsense privacy safeguards.

Schools were not explicitly told to comply or lose federal funds. But the Obama administration also didn’t rule out that possibility in court documents filed in July, saying recipients of federal education dollars “are clearly on notice” that antidiscrimination polices must be followed. Texas alone gets roughly $10 billion in federal education funds.

The lawsuit was filed in May by Texas, Alabama, Wisconsin, West Virginia, Tennessee, Oklahoma, Louisiana, Utah and Georgia, and the Republican governors of Maine, Mississippi and Kentucky. Two small school districts in Arizona and Texas, which have fewer than 600 students combined and no transgender persons on their campuses, also joined the effort to prevent the directive from being enforced.

Staff Writer Eric Russell contributed to this story.