The NDAA faced resistance from some Democrats who were concerned about an amendment that restricted the children of servicemembers from receiving gender-affirming care.
In the House last week, lawmakers cleared the defense bill on a 281-140 vote, with a majority of Democrats objecting to the legislation.
Ahead of the Senate vote, Sen. Tammy Baldwin (D-Wis.) led 20 other senators in introducing an amendment to rescind the transgender amendment, but it failed to pass.
With passage of the NDAA, some military service organizations and LGBTQ rights groups expressed alarm about restrictions on the transgender community.
Human Rights Campaign President Kelley Robinson said that military families "deserve to be treated with respect and trusted to make decisions about their own families’ health care needs."
"A majority in the Senate failed those families today, thousands of whom now face the possibility of losing access to medically necessary care," Robinson said in a statement.
Sen. Chuck Schumer (D-N.Y.) said the NDAA "is not perfect."
"But it still makes several important advances Democrats fought for to secure America’s national defense and take a strong stand against the Chinese Communist Party," he said on the floor ahead of the vote.
Republicans touted the culture war amendments passed in the NDAA, including the restriction on the transgender community.
"I am proud of the conservative wins we were able to deliver in this year’s NDAA for Alabama and our great military,” said Sen. Tommy Tuberville (R-Ala.). “Under Joe Biden, the Pentagon has been more focused on woke politics than on being a lethal killing machine."
Baldwin argued that lawmakers had broken their commitment to servicemembers and that the transgender amendment would affect up to 7,000 people.
"Some folks poisoned this bill and turned their backs on those in service and the people that we represent," she said.
The $895 billion NDAA has some bipartisan proposals, among them: a 14.5 percent raise for junior-enlisted servicemembers and funds to bolster the U.S. presence in the Indo-Pacific and build new warships and planes.
Senate Minority Leader Mitch McConnell (R-Ky.) is among some lawmakers who want to increase the size of the Pentagon budget, despite it approaching nearly a trillion dollars. He spoke out against "artificial budget restraints."
"For all the talk about growing threats to America’s national security, it’s past time for an honest conversation about the military requirements to meet those needs," McConnell said.
President Biden is expected to sign the bill into law and ensure the NDAA has been passed for 60 years straight.
Read more here.