WASHINGTON (AP) -- President Barack Obama has signed legislation reviving and reshaping surveillance laws that expired temporarily Sunday night.

FILE - In a Thursday, May 14, 2015 file photo, President Barack Obama holds a news conference at Camp David in Maryland. (AP Photo/Pablo Martinez Monsivais, File)

The White House says Obama signed the bill late Tuesday evening, hours after the Senate gave its final approval.

Obama says in a statement that he's gratified Congress finally approved the bill. He says his administration will move quickly to restore the lapsed surveillance tools.

The law eliminates the National Security Agency's bulk phone-records collection program and replaces it with a more restrictive measure to keep the records in phone companies' hands.

Obama had blamed Congress for needless delays and an "inexcusable lapse" in national security tools. But he also praised some senators and House members for working in bipartisan fashion to come up with a compromise.

© 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. Learn more about our Privacy Policy and Terms of Use.