The U.S. House of Representatives approved an amendment late Thursday to the defense spending bill in a move that could put an end to the warrantless collection of personal information, the most scrutinized aspect of the National Security Agency, or NSA's, spying activities, since they were made public by Edward Snowden.

The amendment would be made to the $570 billion defense bill and prohibit the NSA and the CIA from "backdoor searches" that include collecting information, without a warrant, on personal communications such as e-mails and online conversations by U.S. citizens, and will bar the agencies from accessing commercial tech products, according to Associated Press, or AP. While 293 representatives voted for the amendment, 123 voted against it.

“We took a big step tonight to #ShutTheBackDoor on unwarranted government surveillance by passing the Massie-Lofgren amendment. The House stood up for the American people and the Constitution, and that is something we can all celebrate,” Zoe Lofgren, D-Calif., said, on her Facebook page.

The House is expected to close the defense bill on Friday after also adding stringent restrictions on the handling of prisoners at Cuba’s Guantanamo Bay, as well as an amendment that would impose a one-year freeze on the transfer of detainees from the prison and block funds for the transfer of detainees to Yemen, AP reported.

The amendments on the transfer of prisoners follow Obama’s decision to exchange five high-ranking Taliban militants, who were locked up for 10 years in Guantanamo Bay, for Sgt. Bowe Bergdahl's release who was in Taliban captivity since 2009. According to Rep. Tom Cotton, R-Ark., the amendment was necessary to allow Congress to investigate "the president's lawless release of the Taliban five," AP reported.

“After the passage of the USA Freedom Act, this amendment is the logical next step to prevent improper surveillance,” Jerrold Nadler, D-N.Y., who co-sponsored the bill, said in a statement before the House began voting, according to the Huffington Post, adding: “I will continue to work to improve our nation’s privacy laws and to ensure that this Administration, and all those that follow it, respect the constitutional rights of all Americans.”

Thomas Massie, R-Ky., who sponsored the amendment said, according to the Huffington Post: “It would take somebody to support it on the Senate side as well, and in conference,” adding: “I think people are waking up to what's been going on,” referring to the opposition of other politicians to the amendments demanding curbs on the agencies' spying activities.