-- President Obama signed legislation reforming the National Security Agency's domestic surveillance program Tuesday, the White House said.
The Senate approved the USA Freedom Act with a vote of 67 to 32, 40 hours after key provisions of the Patriot Act expired.
The NSA shut down its surveillance program late Sunday night after senators failed to reach a deal before the powers expired. The NSA will now restart its surveillance program, a process that will take an entire day, officials said.
The USA Freedom Act ends the government's bulk collection of Americans' phone metadata, instead requiring telecommunications companies to maintain the records. There will be a six-month transition period for the government to move its data to the phone companies. Intelligence officials would then need a court order to query the phone database.
The bill also restores the “lone wolf” and roving wiretaps provisions, which expired Sunday, until 2019.
President Obama indicated he would sign the bill quickly.
Democrats warned against adding amendments to the measure, saying it could complicate its final passage.
“The Senate should not get into a game where they start adding amendments to this piece of legislation that then requires House consideration again,” White House Press Secretary Josh Earnest said Monday.
The passage caps off weeks of debate over the future of the surveillance program first exposed by Edward Snowden in 2013. Sen. Rand Paul, R-Ky., was at the center of the fight, forcing the program to expire at midnight Sunday because of his opposition to any of metadata collection of Americans' phone records.
"This is a debate over the Fourth Amendment. This is a debate over your right to be left alone," Paul said today, referring to the amendment that prohibits unreasonable searches and seizures.
The USA Freedom Act would require intelligence officials to obtain a court order from the FISA court in order to query the phone companies’ database.
Any records provided to the government would be limited to so-called "two hops," meaning intelligence officials can access the records of people who received or placed calls to suspected terrorists, even if they're not suspected terrorists themselves. The program under the Patriot Act allowed officials to access information "three hops" removed from terror suspects.
ABC News’ John Parkinson contributed to this report.