In a 78-21 vote, the US Senate today added an amendment to the upcoming military funding bill formally banning any US government agencies from engaging in torture, and requiring them to provide Red Cross access to any detainee, no matter how secretive.

Despite a wide margin of victory, the bill was opposed by a large number of the Senate’s leaders, including Majority Leader Mitch McConnell (R – KY) and assorted other hawks. Sen. Marco Rubio (R – FL), the lone Senator not present, says he would’ve voted against it as well, on the grounds that the US shouldn’t tell the enemy whether or not they’re going to get tortured beforehand.

The amendment, assuming it survives the eventual reconciliation with the House version of the NDAA, will effectively require all government agencies to comply with the Army’s public manual on the treatment of detainees, and to abide by the Geneva convention against torture.

While rights groups were generally supportive of the passage, Human Rights Watch counsel Laura Pitter noted that the CIA had been carrying out torture in ways that were formally against the law in the first place, and cautioned that a future administration would likely just ignore the rules if they were in a torture kind of mood.