A U.S. secret court has extended until June 1 the controversial bulk collection of private phone records of Americans by the National Security Agency.

The government said it had asked for reauthorization of the program as reform legislation, called the USA Freedom Act, was stalled in Congress. The bill would require telecommunications companies rather than the NSA to hold the bulk data, besides placing restrictions on the search terms used to retrieve the records.

An added urgency for Congress to act comes from the upcoming expiry on June 1 of the relevant part of the Patriot Act that provides the legal framework for the bulk data collections. Under a so-called “sunset” clause, the provision will lapse unless it is reauthorized in some form or the other by legislation.

Section 215 of the Patriot Act, which relates to business records, was used by the government to vacuum telephone metadata from customers of Verizon, according to revelations in 2013 by former NSA contractor, Edward Snowden. The section comes bundled with “gag orders” that prohibit service providers from making such information demands public.

The Foreign Intelligence Surveillance Court had previously extended in December the authorization for the program by 90 days after the USA Freedom Act, backed by the administration of President Barack Obama, failed to pass in the Senate. A version of the bill had passed the House of Representatives.

The government has now sought renewal of the current program up to June 1 in order to align its expiry date with the sunset on the same day of Section 215 of the Patriot Act, according to a joint statement by the Department of Justice and the Office of the Director of National Intelligence on Friday.

In March last year, as part of his reform program for the NSA, Obama had proposed that the data should remain with the telephone companies, and government would have access to that data only through individual court orders. The president, however, said there was need for new legislation to put these changes into effect.

With Section 215 and two other key rules set to lapse on June 1, Congress “has a limited window” before the sunset to enact new legislation “that would implement the President’s proposed path forward for the telephony metadata program, while preserving key intelligence authorities,” according to a statement by the White House press secretary.

A number of civil rights and privacy groups have asked Congress to oppose reauthorization of Section 215, one of several provisions in U.S. law that have provided the legal backing for NSA surveillance of people both in the country and abroad. The sunset of section 215 may not end bulk records collection, particularly of investigations that started before the expiry, according to some interpretations. Government could also use other statutes for domestic bulk data collection.