WASHINGTON — The government’s program of snooping on Americans’ phone records suffered a major reversal when a federal appeals court said it wasn’t justified under the Patriot Act.

The 2nd Circuit in Manhattan ruled Thursday that a key provision of the Bush-era law, Section 215, “cannot bear the weight the government asks us to assign to it and that it does not authorize the telephone metadata program.”

But the court let the program continue, pending action by Congress. The law expires in June.

NSA’s sweeping surveillance began after Congress passed the Patriot Act in the days following the 9/11 attacks.