WASHINGTON (AP) — President Joe Biden on Monday signed into law a defense bill that authorizes significant pay raises for junior enlisted service members, aims to counter China's growing power and boosts overall military spending to $895 billion despite his objections to language stripping coverage of transgender medical treatments for children in military families.

Biden said his administration strongly opposes the provision because it targets a group based on gender identity and "interferes with parents’ roles to determine the best care for their children.” He said it also undermines the all-volunteer military's ability to recruit and retain talent.

"No service member should have to decide between their family's health care access and their call to serve our nation," the president said in a statement.

The Senate forwarded the bill to Biden after passing it last week by a vote of 85-14. In the House, a majority of Democrats voted against the bill after House Speaker Mike Johnson insisted on adding the provision to ban transgender medical care for children. The legislation easily passed by a vote of 281-140.

Biden also objected to other language in the bill prohibiting the use of money earmarked to transfer detainees held at Guantanamo Bay, Cuba, to some foreign countries and into the United States. He urged Congress to lift those restrictions.

The annual defense authorization bill, which directs Pentagon policy, provides a 14.5% pay raise for junior enlisted service members and a 4.5% increase for others.

The legislation also directs resources towards a more confrontational approach to China, including establishing a fund that could be used to send military resources to Taiwan in much the same way that the U.S. has backed Ukraine. It also invests in new military technologies, including artificial intelligence, and bolsters the U.S. production of ammunition.

The U.S. has also moved in recent years to ban the military from purchasing Chinese products, and the defense bill extended that with prohibitions on Chinese goods from garlic in military commissaries to drone technology.

The legislation still must be backed up with a spending package.

__

Associated Press writer Stephen Groves contributed to this report.