A decade after Sept. 11, 2001, Congress was deeply divided over the sweeping surveillance powers it had granted the government in the immediate aftermath of the attacks. So when it came time to reauthorize the legislation, lawmakers kept the intelligence community on what they imagined was a short leash: a four-year extension.
That was in 2011 — long before anyone in Congress knew the name Edward J. Snowden.
Now the law's sunset date — June 1 — is fast approaching, and Snowden's revelations about the government's dragnet approach to gathering telephone data have created some hard terrain between lawmakers and a reauthorization of the Patriot Act.
Congress is focused on provisions used by the National Security Agency to scoop up phone data in an effort to catch terrorists who might be calling the United States.
Spies say the program is a useful tool that they are reluctant to give up. Civil libertarians say it amounts to a mass invasion of privacy. Several groups have sued the government to make it stop.
Jeffrey Anchukaitis, a spokesman for Director of National Intelligence James R. Clapper, said Friday that officials are confident Congress will act in time to save the program. But while negotiations are underway on Capitol Hill, it is unclear how lawmakers intend to tackle the problem.
Neema Singh Guliani, a lawyer with the American Civil Liberties Union in Washington, hopes the deadline will force a substantive debate about the future of spying.
"There's going to be a significant amount of opposition from both the public and members of Congress to just cleanly reauthorizing the provisions," she said. "That creates an impetus to really think about this problem."
Snowden, a former CIA employee and NSA contractor who lived in Maryland fled to Hong Kong in 2013 with documents that revealed the government's telephone surveillance.
The NSA says it was not listening in on conversations, but privacy advocates contend that the metadata the agency collected — the numbers dialed, the time and length of calls — can be revealing. Imagine calls to a psychiatrist's office, a pastor or a suicide hotline, advocates say.
Officials say congressional committees and the secret Foreign Intelligence Surveillance Court have provided sufficient oversight, and stress that no major abuses of the records have been uncovered.
Still, President Barack Obama has ordered changes to the program, cutting the number of leaps through phone data the NSA can make. Previously, investigators could look at anyone in contact with a suspect, as well as anyone in contact with that expanded group, and anyone in contact with that second group. Now they cannot take that last step.
Officials also gave the court a larger role in approving targets.
But despite extensive news coverage and unprecedented admissions by the government, little else has changed since the Snowden leaks.
In late February, the Office of the Director of National Intelligence announced that the government had obtained a court order to keep the phone data program going at least until the June 1 deadline. The court's order was released to the public last week.
The program has been challenged repeatedly in the courts. One federal judge in Washington said it was likely unconstitutional, but two others have declined to stop it. The three cases are now before appeals courts and might not be decided until after the law is set to expire.
That leaves Congress, which took a stab at changing the law last year, to determine its future.
Some lawmakers have rallied behind the idea of leaving the data in control of the phone companies, who already keep it for a time, and allowing the NSA to look at it when it wants, rather than having the government collect it.
The House of Representatives supported that approach last year in a bill backed by Rep. C.A. Dutch Ruppersberger of Baltimore County, then the top Democrat on the House Intelligence Committee. But in the Senate, legislation that would have done more to restrict the NSA, supported by a majority and by the White House, stalled on a crucial vote.
In the debate ahead of the vote, some Republican lawmakers said they feared that making changes to the phone program would leave the country less able to detect Islamic State terrorists planning an attack on American soil.
"God forbid, tomorrow morning we wake up to the news that a member of ISIL is in the United States and federal agencies need to determine who this person is coordinating with to carry out a potential attack within the homeland," said Sen. Marco Rubio, a Florida Republican.
In the immediate aftermath of the Snowden leaks, intelligence officials said the NSA's surveillance activities had helped foil dozens of terrorist plots. But it does not seem that the phone program played any significant role, according to the Privacy and Civil Liberties Oversight Board, an internal government watchdog.
"We have not identified a single instance involving a threat to the United States in which the program made a concrete difference in the outcome of a counterterrorism investigation," the board reported in 2014.
The board did find one national security case in which the phone data collection might have helped. But it involved someone sending money to an overseas terrorist group and letting it use his home in Somalia, not planning an attack on the United States.
Officials say the phone program is akin to an insurance policy.
"I do not happen to think the number of plots foiled is the only way to prove its value," Robert Litt, general counsel for the Office of the Director of National Intelligence, said at a recent appearance at the Brookings Institution.
Despite questions over the program's utility, some key members of Congress support reauthorizing the section of the law that underpins it.
Rep. Bob Goodlatte, chairman of the House Judiciary Committee, said it is imperative to keep the law alive beyond June 1.
"I am committed to reforming the bulk collection program [during] this Congress so that we protect Americans' civil liberties while ensuring that the traditional capabilities of our intelligence-gathering programs are not disturbed," the Virginia Republican said.
Since the debate last year, Republicans have taken control of the Senate. It is unclear whether the legislation Congress pursues will resemble the bill approved by the House or the measure considered by the Senate — or whether lawmakers might seek to just reauthorize the law, as Congress did in 2011.
Rep. Adam Schiff, who took over Ruppersberger's spot as the ranking Democrat on the House Intelligence Committee, said he doesn't think there would be sufficient support for a simple reauthorization.
"I believe there is bipartisan support for a bill that keeps telephone metadata in the hands of the telephone companies and has the government only query the data on a case-by-case basis, pursuant to court approval," the California Democrat said.
There is one final wrinkle: Other parts of the law would also expire if nothing gets done. They help the FBI track terror suspects through wiretaps that can leap from phone line to phone line and change definitions in the law to make it easier to track so-called lone wolves — suspects who act alone.
Sen. Dianne Feinstein, the vice chairman of the Senate Intelligence Committee, said it is important to consider all of those provisions together.
"If the authorities expire," she said, "the intelligence community will lose key tools to identify terrorists and protect the United States."