In a sharp and unexpected shift, the national debate about U.S. government surveillance seems to be turning in favor of reining in the National Security Agency’s expansive spying powers at home and abroad.

It’s happened suddenly, in a span of just three days. First, a federal judge ruled that the NSA’s bulk collection of telephone records was unconstitutional, and then a presidential advisory panel recommended sweeping changes to the agency. Together, the developments are ratcheting up the pressure on President Barack Obama to scale back the controversial surveillance programs.

Even Russian President Vladimir Putin chimed in Thursday. He said U.S. surveillance efforts are necessary to fight terrorism and “not a cause for repentance,” but he, too, said they should be limited by clear rules.

Obama is in no way obligated to make substantial changes. And, countering the public criticism he faces, he hears internal appeals from intelligence officials who insist the collection of phone and Internet data is necessary to protect the U.S. from terror attacks.

But even that argument has been undermined in the course of an extraordinary week. Federal Judge Richard Leon said in a ruling Monday — its effect stayed, pending appeal — that even if the phone data collection is constitutional, there is little evidence that it has prevented terror attacks. The intelligence advisory panel, which had access to significant amounts of classified information and counted as a member a former acting director of the CIA, came to the same conclusion in its 300-page report.

Sen. Ron Wyden, D-Ore., a fierce critic of the NSA programs, concluded, “What this says to the millions of Americans who have been concerned that the government knows who they called and when they called and for how long, this says it wasn’t essential for preventing attacks.”

The White House has already rejected one proposal from the task force, which would have allowed for a civilian to head the NSA. Although Obama spokesman Jay Carney said Thursday that the president was open to each of the panel’s other 45 recommendations, a U.S. official familiar with the deliberations said that Obama rejected a handful of the proposals out of hand when he met with the panel members this week.

The president indicated he was comfortable with about half of the recommendations but thinks some others need further study, according to the official.

Congress has been jarred by the new focus on government surveillance. For years, lawmakers had shown little interest in curtailing the programs, but an unusual coalition of conservative Republicans and liberal Democrats has now taken up the issue.

However, Capitol Hill appears stuck over how to proceed. A broad bipartisan coalition in the House is backing legislation that would prohibit the NSA from collecting hundreds of millions of telephone records every day from U.S. phone companies. But congressional leaders, who have been briefed for years on the classified terrorist-tracking programs, generally support more modest changes to the surveillance systems and have sidelined the House measure.

The chairs of both the House and Senate intelligence committees have also championed more-limited legislation that would call for greater court and congressional oversight of the NSA.

NSA supporters worry that curtailing the surveillance programs would leave the country vulnerable to threats.

“Any intelligence collection reforms must be careful to preserve important national security capabilities,” said Rep. Mike Rodgers, R-Mich., the chairman of the House Intelligence Committee.