The final draft of the bicameral, bipartisan-approved defense authorization bill contains a number of rebukes of President Trump’s actions as commander in chief, in addition to defying him over both of the grounds on which he has threatened to veto the legislation.

Topping the list is a prohibition on reducing the number of troops stationed in Germany and South Korea below current levels unless Congress receives certain guarantees that it is strategically safe and lawmakers are given ample time to consider the drawdown. The proscription against troop movements was written in response to the Trump administration’s summer announcement that it planned to move about 12,000 U.S. troops out of Germany.

The bill states the secretary of defense must certify that certain conditions have been met and consultations have occurred at least 120 days before attempting to reduce troop levels in Germany below 34,500, and 90 days before attempting to reduce the number of troops in South Korea below 28,500. The reductions were included in the House’s version of the defense bill and endorsed by a group of Senate Republicans.

In the past several weeks, only a couple of the disputes between Congress and the White House over the defense bill have played out publicly, as the GOP-led Senate and Democratic-led House tried to hammer out a compromise version of the defense bill. The elements that received the most attention became focal points in large part because of Trump’s threats to veto the legislation.

Earlier this week, the president tweeted that he would scuttle the defense bill if it did not include a repeal of unrelated liability protections for technology companies. It was the second veto threat he has issued; the first, this summer, demanded the removal of an instruction to the Pentagon to change the names of bases bearing the monikers of Confederate leaders.

The final bill does not mention the piece of law regarding Silicon Valley, and instructs the Defense Department to change the names of the Confederate-titled installations within three years.

Over the course of his presidency, Trump has routinely clashed with leading and mainstream Republicans over his unorthodox approach to foreign policy, prompting Congress to pass laws reaffirming support for NATO and restraining Trump’s ability to reduce sanctions levied against Russia.

Although Republicans were largely circumspect about criticizing the president publicly as he waged his 2020 reelection battle, several provisions of the 4,500-plus-page bipartisan bill suggest that GOP lawmakers have had complaints to get off their chests about more of Trump’s actions — and want to ensure no future president repeats them.

The defense bill directs the president within 30 days to impose sanctions against Turkey for its purchase of S-400 missile systems from Russia, a reflection of how both Republicans and Democrats in Congress have been frustrated by the administration’s reluctant approach to addressing Ankara’s challenges to NATO. It also orders the defense secretary to submit an annual report about any Russian-sponsored bounties for attacks against U.S. military personnel. Trump came under fire this summer for dismissing intelligence about such a scheme in Afghanistan as “not credible.”

The bill also takes indirect issue with the president’s statements about forces deployed to Syria, with a provision insisting the Pentagon certify that no U.S. forces “are being used or have been used for the extraction, transport, transfer or sale of oil from Syria.” Late last year, Trump told reporters that he was leaving troops in Syria — after threatening to withdraw them — “only for the oil.”

The bill contains several repudiations of Trump’s use of the military on the home front as well. It limits the amount of military construction funding that can be diverted to domestic projects via a national emergency order to an annual $100 million — a far cry from the $3.6 billion Trump attempted to divert to his border wall project in 2019. It sets a ceiling of $500 million for overseas projects.

There also are provisions that address the administration’s response to this year’s sweeping national protests against police brutality and racism that have prompted discussions about police restructuring in Congress and across the country. The defense bill demands that federal law enforcement officers and members of the U.S. armed forces and National Guard “visibly display” the name of their agency and their own name when participating in a response to a civil disturbance. It also prohibits the Pentagon from transferring certain weapons of war to state and local law enforcement agencies, an apparent response to complaints about the militarization of police forces. The list of items that cannot be transferred from military to police includes bayonets, weaponized tracked combat vehicles, weaponized drones, and most grenades with the exception of stun and flash-bang grenades.

Finally, the bill offers criticism of the president in what it does not include. For example, it does not include the $10 million the Senate had approved for conducting a nuclear test explosion, something that the Trump administration had expressed interest in reviving earlier this year. It also does not include a prohibition on employees of the Defense Department using TikTok, despite Trump’s efforts to ban it in the United States.