Lawmakers crafting the annual defense bill agreed this week to allow some U.S. strategic allies to continue purchasing Russian military equipment without facing the threat of mandatory sanctions.

It’s a victory for congressional Republicans and Democrats who vigorously opposed the Trump administration’s request for broad authority to determine, on its own, which countries would be exempt from severe financial penalties for buying Russian weapons.

Sen. Jim Inhofe (R-OK), who helped craft the defense bill from his perch on the armed services committee, told The Daily Beast that the final piece of legislation will exempt just three countries—India, Indonesia, and Vietnam—from a robust sanctions regime enacted and imposed last year.

“They are currently buying [Russian] equipment that has to be maintained until they make the transition, and those three fall into that category,” Inhofe said in a brief interview.

“That was us,” Inhofe added, referring to the fact that Congress, not the Trump administration, decided which countries can obtain waivers. Congressional sources involved in the process told The Daily Beast that the Pentagon was vigorously lobbying lawmakers for broad waiver authority—something that even Trump’s biggest supporters on Capitol Hill weren’t prepared to authorize.

The sanctions legislation that was overwhelmingly adopted last year, known as the Countering America’s Adversaries Through Sanctions Act (CAATSA), includes a provision that granted a waiver to countries that could show that they were taking steps to reduce their reliance on Russian military equipment. But some U.S. strategic allies, most notably India, said they needed to continue buying the S-400 missile defense system from Russia’s state-owned arms exporter in order to replace existing systems.

According to the defense bill’s summary released Monday night, the “modified waivers” will “exclude the possibility of waivers for Russian intelligence agencies and other entities engaged in cyberattacks.” Additionally, the legislation requires the administration to certify whether India, Indonesia and Vietnam can remain exempt from sanctions. That means those countries must show that they are sufficiently reducing their reliance on Russian weapons systems.

But last week, some top senators were arguing against waivers altogether. Sen. Bob Menendez (D-N.J.), the top Democrat on the foreign relations committee, told The Daily Beast that expanding the waiver process “undermine[s] the very essence of those sanctions” against Russia.

But others, like Senate Majority Whip John Cornyn (R-TX) and Rep. Adam Smith (D-WA), the top Democrat on the House Armed Services Committee, argued that sanctioning India would drive that nation even closer to Russia.

“The Pentagon has made a very strong case that we need India, we want to build a relationship there and not cut it off,” Smith told The Daily Beast last week. “We’re trying to craft a waiver that is not blanket, which says: you have to meet certain criteria in order to qualify for the waiver.”

Congress passed CAATSA last year in response to Russia’s interference in the 2016 U.S. presidential election, its annexation of Crimea, and its incursions into eastern Europe and the Middle East. The sanctions specifically target Russia’s defense and intelligence sectors. Lawmakers are considering imposing even more sanctions as intelligence chiefs warn that Moscow is preparing to interfere in the 2018 elections, too.

The Trump administration opposed key parts of the legislation and tried to water it down as lawmakers were writing it last year. The State Department and the Treasury Department have been criticized by Democrats and Republicans for not fully implementing the sanctions by the mandatory deadlines.