Dec. 24 (UPI) — President Joe Biden signed the $895 billion National Defense Authorization bill into law even though it included a package that limited transgender care.

Many Democrats bucked the bill after House Speaker Mike Johnson, R-La., put in language that would ban some gender-affirming care for transgender children of service members just before the vote. An attempt to strike Johnson’s insertion failed.

The compromise bill that was negotiated privately includes a 14.5% pay hike for junior enlisted troops and a 4.5% increase for all other service members. It also prevents the Pentagon from backing critical race theory in academic institutions and puts a hiring freeze on diversity, equity, and inclusion programs.

“This bill provides vital benefits for military personnel and their families and includes critical authorities to support our country’s national defense, foreign affairs, and homeland security,” President Joe Biden said in a statement.

“While I am pleased to support the critical objectives of the act, I note that certain provisions of the act raise concerns.”

Biden said the White House “strongly opposes” the part of the bill that limits transgender care, saying it targets that part of the military community.

“By prohibiting the use of appropriated funds, the Department of Defense will be compelled to contravene clinical practice guidelines and clinical recommendations,” Biden said.

“The provision targets a group based on that group’s gender identity and interferes will parents’ to determine best care for their children.”

Supporters of the measure said that funding medical care for transgender individuals moves the funding away from the military’s core mission. Some LGBTQ advocate groups, however, said the law would force servicemembers with transgender children to leave the military because the care is no longer available.