One of the biggest defenders of the government's sweeping spying powers is now on board with legislation that would effectively end intelligence agencies' bulk collection of Americans' phone records.

In a letter sent this week to Senate Judiciary Committee Chairman Patrick Leahy, Attorney General Eric Holder and Director of National Intelligence James Clapper said they are supportive of the Vermont Democrat's most recent version of the USA Freedom Act, which was unveiled in July shortly before Congress went on summer recess.

"The intelligence community believes that your bill preserves essential intelligence-community capabilities; and the Department of Justice and the Office of the Director of National Intelligence support your bill and believe that it is a reasonable compromise that enhances privacy and civil liberties and increases transparency," the two officials wrote. "Overall, the bill's significant reforms should provide the public greater confidence in our programs and the checks and balances in the system."

Clapper's vote of confidence for the bill is especially notable, as he has long insisted that intelligence agencies need to be able to conduct sweeping surveillance in order to protect national security. Clapper also famously testified before Congress last year that the NSA did "not wittingly" collect electronic records on millions of Americans without a warrant, a claim that was later refuted by Edward Snowden's leaks of classified documents.

Privacy advocates quickly cheered the decision.

"This support from our leaders on national security strongly confirms that we can advance privacy protections without sacrificing our safety," said Nuala O'Connor, president of the Center for Democracy and Technology. "After a year of debate, the consensus is clear: Bulk collection is invasive and unnecessary, and its prohibition will not hamper essential intelligence needs. Now it's time to move forward and pass Senator Leahy's USA Freedom Act."

The USA Freedom Act, originally introduced by Rep. Jim Sensenbrenner last year, would end the government's ability to collect bulk metadata of phone records and usher in a series of new privacy and transparency measures designed to prevent abuses at the nation's intelligence agencies. It would bar the government from retaining metadata—the numbers and time stamps of calls but not their actual content—and instead require phone companies to keep those records, which would be given to intelligence agencies after the government earned approval for data searches from the Foreign Intelligence Surveillance Court.

A weaker version of the legislation passed the House earlier this year, though many House lawmakers have indicated they are supportive of the changes made in Leahy's draft, which also boasts the backing of tech companies and most civil-liberties and privacy groups. Some defense hawks, such as Senate Intelligence Committee Chairwoman Dianne Feinstein, still have concerns that the bill may go too far in limiting the government's spying authority.

Many observers believe Senate Majority Leader Harry Reid will attempt to bring the Freedom Act straight to the floor shortly after Congress returns from its break next week.