The 973-page National Defense Authorization Act, or NDAA, passed by an 86-8 vote.
However, in an unusual procedural move, the Senate will have a separate vote on Friday on an amendment that would ban Republican President Donald Trump from attacking Iran without first obtaining congressional approval.
Despite growing tensions with Iran, the amendment is not expected to get the 60 votes needed to pass the Republican-controlled Senate.
Among other provisions, the Senate NDAA requires detailed reporting from the Department of Defense to prevent transfers of sensitive technology to China or Russia, as well as reports on access to the Arctic.
It also requires tighter screening of scholars seeking visas to the United States.
The Senate’s passage of the NDAA comes as Trump prepares for a high-stakes meeting with Chinese President Xi Jinping in Osaka on Saturday on the sidelines of the G20. Many hope the meeting will help end a months-long trade war between the world’s top two economies.
The NDAA is still several steps from becoming law. The Senate version must be reconciled with a version expected to come up for a vote next month in the Democratic-controlled House of Representatives.
And that compromise version, expected later this year, must pass both the Senate and House, and be signed into law by Trump.
The Senate NDAA also includes an amendment to bar federal funds from going to Chinese state-owned companies such as CRRC, the world’s largest maker of passenger trains.
One of the few pieces of major legislation passed every year, the NDAA becomes a vehicle for a broad range of policy measures, as well as determining everything from military pay levels to which ships or aircraft will be modernized, purchased or discontinued.
The Senate bill includes $3.6 billion Trump requested to cover construction of the wall on the border with Mexico that the president has made a centerpiece of his hard-line stance on immigration. It does not include an additional $3.6 billion requested for the wall.
The Senate NDAA also contains an amendment to strengthen sanctions against North Korea, imposing secondary sanctions on financial institutions that do business with Pyongyang in violation of existing sanctions.
Reporting by Patricia Zengerle; additional reporting by David Brunnstrom and Alex Alper