A US senator has bluntly asked the National Security Agency if it spies on Congress, raising the stakes for the surveillance agency’s legislative fight to preserve its broad surveillance powers.

Bernie Sanders, a Vermont independent and socialist, asked army general Keith Alexander, the NSA’s outgoing director, if the NSA “has spied, or is the NSA currently spying, on members of Congress or other American elected officials”.

Sanders, in a letter dated 3 January, defined “spying” as “gathering metadata on calls made from official or personal phones, content from websites visited or emails sent, or collecting any other data from a third party not made available to the general public in the regular course of business”.

The NSA collects the records of every phone call made and received inside the United States on an ongoing, daily basis, a revelation first published in the Guardian in June based on leaks from whistleblower Edward Snowden. Until 2011, the NSA collected the email and internet records of all Americans as well.

On Saturday, the NSA released a statement in response to Sanders' letter, which said: “NSA’s authorities to collect signals intelligence data include procedures that protect the privacy of US persons. Such protections are built into and cut across the entire process. Members of Congress have the same privacy protections as all US persons.

“NSA is fully committed to transparency with Congress. Our interaction with Congress has been extensive both before and since the media disclosures began last June. We are reviewing Senator Sanders’s letter now, and we will continue to work to ensure that all Members of Congress, including Senator Sanders, have information about NSA’s mission, authorities, and programs to fully inform the discharge of their duties.”

Hours after Sanders sent his letter on Friday, the office of the director of national intelligence, James Clapper, announced that the Foreign Intelligence Surveillance (Fisa) Court had renewed the domestic phone records collection order for another 90 days.

This is the first time the order has been renewed since two competing rulings in the last month, one from a federal judge in Washington who declared the program "likely unconstitutional" and another in New York who said that it was lawful.

In a statement, ODNI spokesman Shawn Turner said the renewal of the order under Section 215 of the Patriot Act had been declassified "to provide the public a more thorough and balanced understanding of the program".

He continued: "It is the administration's view, consistent with the recent holdings of the United States District Courts for the Southern District of New York and Southern District of California, as well as the findings of 15 judges of the Foreign Intelligence Surveillance Court on 36 separate occasions over the past seven years, that the telephony metadata collection program is lawful."

The NSA has argued that surveillance does not occur when it acquires the voluminous amount of phone data, but rather when its analysts examine those phone records, which they must only do, pursuant to the secret court orders justifying the collection, when they have “reasonable articulable suspicion” of a connection to specific terrorist groups. Declassified rulings of the secret surveillance court known as the Fisa court documented “systemic” violations of those restrictions over the years.

Sanders’ office suggested the senator, who called the collection “clearly unconstitutional” in his letter, did consider the distinction salient.

Asked if Sanders meant the collection of legislators’ and officials’ phone data alongside every other American’s or the deliberate targeting of those officials by the powerful intelligence agency, spokesman Jeff Frank said: “He’s referring to either one.”

The NSA did not immediately return a request for comment.

Sanders’ question is a political minefield for the NSA, and one laid as Congress is about to reconvene for the new year. Among its agenda items is a bipartisan, bicameral bill that seeks to abolish the NSA’s ability to collect data in bulk on Americans or inside the United States without suspicion of a crime or a threat to national security. Acknowledgement that it has collected the communications records of American lawmakers and other officials is likely to make it harder for the NSA to argue that it needs such broad collection powers to defend against terrorism.

Civil liberties and tech groups are planning a renewed lobbying push to pass the bill, called the USA Freedom Act, as they hope to capitalize on a White House review panel that last month recommended the NSA no longer collect so-called metadata, but rely on phone companies to store customer data for up to two years, which is longer than they currently store it.

In his statement, Turner said the intelligence community "continues to be open to modifications to this program that would provide additional privacy and civil liberty protections while still maintaining its operational benefits," such as having the data "held by telecommunications companies or a third party".

Advocates want an end to the metadata bulk collection as well as no expansion of phone company data record storage.

The Senate judiciary committee, whose chairman Patrick Leahy is an architect of the USA Freedom Act, announced Friday that it will hold a hearing with the review panel’s membership on 14 January.

Additionally, the Justice Department announced a formal appeal of a 16 December federal court loss over the legality and constitutionality of the NSA’s bulk phone records collection effort. The appeal follows one by the ACLU, which sought redress in a different federal court after a judge ruled 27 December that the NSA bulk collection passes constitutional muster.

The NSA has yet to directly address whether elected officials are getting caught in its broad data trawls. While senator Jeff Merkely of Oregon dramatically waved his phone at Alexander during a June hearing – “What authorized investigation gave you the grounds for acquiring my cellphone data,” Merkely asked – the NSA has typically spoken in generic terms about needing the “haystack” of information from Americans it considers necessary to suss out terrorist connections.

The NSA and its allies have been under fire for months about their public presentation of the scope of domestic surveillance. House judiciary committee Republicans in December wrote to attorney general Eric Holder calling for an investigation of director of national intelligence James Clapper, who has acknowledged untruthfully testifying that the NSA does “not wittingly” collect data on millions of Americans.

“We must be vigilant and aggressive in protecting the American people from the very real danger of terrorist attacks,” Sanders wrote to Alexander on Friday. “I believe, however, that we can do that effectively without undermining the constitutional rights that make us a free country.”