Lawmakers want to shake up a controversial surveillance program that allows U.S. intelligence officials to peek at the phone records of millions of Americans after details of the government’s spying methods were leaked to the public.

Two camps are forming along untraditional lines on how to rein in the National Security Agency and how much of its power to strip away.

Sen. Dianne Feinstein, D-Calif., introduced a proposal that would limit NSA collection to metadata — the who, what and when of a phone call — and specifically bar federal agencies from building a database that includes the content of calls between ordinary citizens. The NSA has insisted that it never listened in on conversations, only tracked information like phone numbers and times of calls.

Feinstein’s legislation also would limit use of a national phone record database to suspected terrorists and associates while shortening the length of time those records could be held. The NSA would be required to provide more frequent reports on the use of these programs.

The legislation, dubbed the Foreign Intelligence Surveillance Act, is expected to emerge from the Senate Intelligence Committee in October with support from Democrats and Republicans who largely see the NSA as a victim of espionage. In a rare public meeting of the committee late last month, Feinstein joined Republicans and the head of the NSA in blaming the media for public paranoia about the government’s spying methods after they were leaked by former NSA and CIA contractor Edward Snowden.

Read More: