President Obama signed the first piece of legislation to reform the government's controversial surveillance program on Tuesday evening.

After a long fight, Congress passed the USA Freedom Act reform bill just days after political gridlock caused the National Security Agency's (NSA) powers to expire under the Patriot Act.

In a 67-32 vote, the Senate approved the USA Freedom Act, which was designed to prevent the NSA surveillance program from collecting Americans' phone records. Because it passed more than 36 hours after three parts of the Patriot Act expired, the NSA was forced to shut down its bulk collection of U.S. phone data.

The USA Freedom Act also limits other types of data collection, while adding new measures for transparency and a new panel to oversee intelligence activity within the Foreign Intelligence Surveillance Court.

"It's an historic moment," Democratic Sen. Patrick Leahy, one of the authors of the bill, following the vote, reports The Hill. "It's the first major overhaul in government surveillance laws in decades and adds significant privacy protections for the American people."

Although Obama welcomed the bill's final passage on Tuesday, he criticized those who delayed it, like Kentucky Sen. Rand Paul.

"After a needless delay and inexcusable lapse in important national security authorities, my administration will work expeditiously to ensure our national security professionals again have the full set of vital tools they need to continue protecting the country," he said in a statement, according to CNN.

Paul, a GOP presidential candidate and champion for civil liberties, assailed the NSA in a 10-hour speech, blasting both those who wanted to renew the Patriot Act and supporters of the USA Freedom Act, which he argued was an expansion of the Patriot Act.

On the other hand, Senate Majority Leader Mitch McConnell and other defense hawks including Sens. John McCain and Lindsey Graham argued that an expansion of the Patriot Act was essential for national security.