The Trump administration has backed an Idaho law that prohibits transgender women and girls from athletic competition.

The law, the first in the nation, was signed by Governor Brad Little, a Republican, in March and takes effect on July 1. It received overwhelming support from Republicans in the House and Senate. Democrats unanimously opposed the measure.

The American Civil Liberties Union (ACLU) and Legal Voice filed a lawsuit challenging the law in April.

On Friday, the U.S. Department of Justice (DOJ) submitted a filing in the case in support of the law, the AP reported. DOJ lawyers argue that the law does not violate the 14th Amendment's Equal Protection Clause, as is claimed in the lawsuit.

The “Equal Protection Clause does not require states to abandon their efforts to provide biological women with equal opportunity to compete for, and enjoy the life-long benefits that flow from, participation in school athletics in order to accommodate the team preferences of transgender athletes,” the DOJ's filing states.

The Alliance Defending Freedom (ADF), which is opposed to LGBT rights, is seeking to intervene in the case. The ADF, which helped craft the law, applauded the DOJ's stance.

“We commend the DOJ for supporting a level playing field for female athletes,” the group said in a statement.

The DOJ filing comes just days after the Supreme Court ruled that LGBT workers are protected from discrimination under current federal civil rights law. The DOJ had argued that the law does not prohibit businesses from firing workers who identify as gay or transgender.

(Relate: Supreme Court: Federal law protects LGBT workers from discrimination.)