WASHINGTON (AP) — The House is poised to pass legislation that would end the National Security Agency's bulk collection of American phone records. The compromise bill is displeasing many civil liberties activists but would significantly change the most controversial program revealed by former agency contractor Edward Snowden.

The USA Freedom Act would codify a proposal President Barack Obama made in January. He said he wanted to end the NSA's practice of collecting the "to and from" records of nearly every American landline telephone call under a program that searched the records for connections to terrorist plots abroad. But the bill would instruct the phone companies to keep the records.

Opponents are denouncing the bill, saying it had been "gutted" to win agreement from lawmakers who support the NSA phone records program.

More From WIBX 950