A federal judge has blocked a directive from President Joe Biden’s administration that allowed transgender workers and students to use school restrooms matching their gender identities. 

It also allowed transgender athletes to join sports teams corresponding with their chosen genders.

The directive was blocked by Judge Charles Atchley Jr. of the Eastern District of Tennessee, a Trump appointee, after a coalition of 20 Republican attorneys general sued last year, Reuters reported.

Some states have issued requirements regarding neutral-gender bathrooms

Inclusive Public Restroom Sign. Genderless And Handicapped Toilet (Istock/ AndreyPopov)

The plaintiffs argued the federal directive clashed with state laws and prevented states from enforcing their own laws that banned transgender school bathroom use.

BIDEN ADMIN HOLDING SCHOOL LUNCH MONEY 'HOSTAGE' TO FORCE TRANSGENDER POLICIES, ACTIVIST PARENT SAYS

Judge Atchley agreed, saying in his opinion the states "cannot continue regulating pursuant to their state laws while simultaneously complying with Defendants' guidance," Reuters reported.

The states also argued the Biden administration's Justice Department, the Department of Education and the Equal Employment Opportunity Commission — the defendants in the case — improperly justified the bathroom directive through the U.S. Supreme Court’s decision in Bostock v. Clayton County.

President Joe Biden

WASHINGTON, DC - JULY 16: President Joe Biden walks off Marine One on the South Lawn of the White House on July 16, 2022 in Washington, DC. (Photo by Tasos Katopodis/Getty Images)

In the case, Clayton County fired county employee Gerald Bostock for "unbecoming" behavior after he participated in a gay recreational softball league. The Supreme Court ruled in 2020, that workplace sex discrimination in Title VII of the Civil Rights Act of 1964 should extend to sexual orientation and gender identity.

GOP LAWMAKERS SLAM HOUSE DEMS FOR GENDER-NEUTRAL BATHROOM PUSH AS ‘ECONOMY IS IN THE TOILET’

The high court said in its decision they were not deciding whether "sex-segregated bathrooms, locker rooms, and dress codes' violate Title VII."

In 2021, after President Biden was sworn into office and appointed new leadership, the Department of Education issued guidance to apply the 2020 case to schools.

EIGHTH-GRADE GIRL BLASTS SCHOOL BOARD FOR POLICY THAT WOULD ALLOW 'BOYS INTO GIRLS' LOCKER ROOMS'

The department suggested the court’s decision should be applied to sex-segregated bathrooms — but Judge Atchley disagreed.

Judge Charles Atchley Jr.

WASHINGTON, DC - NOVEMBER 18: Assistant U.S. Attorney for the Eastern District of Tennessee Charles Atchley Jr. testifies during his confirmation hearing before the Senate Judiciary Committee in the Dirksen Senate Office Building on Capitol Hill November 18, 2020 in Washington, DC. (Photo by Chip Somodevilla/Getty Images)

The Supreme Court in Bostock "explicitly refused to decide whether 'sex-segregated bathrooms, locker rooms, and dress codes' violate Title VII," the judge said in his opinion, Reuters reported.

CLICK HERE TO GET THE FOX NEWS APP

Oklahoma Attorney General John O'Connor, who was among the plaintiffs, called the decision "a major victory for women's sports and for the privacy and safety of girls and women in their school bathrooms and locker rooms," per the report.