Lawmakers on both sides of the encryption debate on Wednesday sought to cast a court order compelling Apple to help the FBI access a locked iPhone as evidence of their argument.

A magistrate judge in California on Tuesday ordered Apple to write a custom software package that would help the government unlock a smartphone used by one of the suspects in the Dec. 2, 2015, San Bernardino shooting. Apple, which has long opposed government attempts to bypass or weaken encryption, said it would fight the order on privacy and security grounds.

Sen. Ron Wyden (D-Ore.), one of Congress’s leading civil-liberties advocates, sharply criticized the court order and the judge’s reliance on an obscure 1789 statute.

“This unprecedented reading of a nearly 230-year-old law would create a dangerous precedent that would put at risk the foundations of strong security for our people and privacy in the digital age,” Wyden said in a statement to the Daily Dot. “If upheld, this decision could force U.S. technology companies to actually build hacking tools for government against their will, while weakening cybersecurity for millions of Americans in the process.”

In the House, Rep. Justin Amash (R-Mich.), a vocal critic of government surveillance measures, called the FBI’s demand “unconscionable and unconstitutional,” and he promised Apple CEO Tim Cook that he would “do everything I can to support your efforts to protect the public.”

Rep. Zoe Lofgren (D-Calif.), who has cosponsored legislation addressing digital security and privacy, called the court order “an astonishing overreach of authority by the Federal government.”

“It is astonishing,” Lofgren said in a statement, “that a court would consider it lawful to order a private American company be commandeered for the creation of a new operating system in response” to the government’s inability to break encryption.

“Should this order not be overturned,” she added, “technology companies will have no choice but to further deploy robust encryption that would prevent their engineers from creating any system that would effectively open up previously deployed security measures.”

But the ranking member on the Senate Intelligence Committee, Dianne Feinstein (D-Calif.), disagreed, saying in a statement that it was “not unreasonable for Apple to provide technical assistance when ordered by the court.”

“I understand there are privacy concerns,” said Feinstein, who is working with committee chairman Sen. Richard Burr (R-N.C.) on legislation that will address encryption. “But in this case the phone is owned by the county—which has consented to a search—and there is a valid search warrant.”

Burr agreed, saying in a statement to the Daily Dot, “In this case, under a valid court order, Apple has been asked by the FBI to unlock a government owned cell phone to assist in the investigation of a terror attack that killed 14 Americans. Court orders are not optional and Apple should comply.”

Other lawmakers tried to eke out a middle ground. Sen. Mark Warner (D-Va.), who is crafting legislation to create a commission on digital security challenges that would address encryption, said the contentious ruling illustrated the need for a more robust public debate.

“The courts should not be left to set policy without a national dialogue on how our national security and technology policy interact,” Warner said in a statement. “Absent a national consensus, we might end up with an ad hoc policy with serious long term ramifications, including potentially undermining the competitiveness and technological innovation of the United States.”

A spokesman for the other lawmaker planning that commission, House Homeland Security Committee Chairman Michael McCaul (R-Texas), declined to comment.

A House Judiciary Committee aide echoed Warner’s remarks, saying, “Congress should fully examine the issue to be sure [privacy safeguards] are in place while finding new ways to help law enforcement fight crime and keep us safe.” The aide revealed that the committee will hold an encryption hearing on March 1.

A spokesman for House Intelligence Committee Chairman Devin Nunes (R-Calif.) declined to comment on the order. But in a statement, Adam Schiff (D-Calif.), the committee’s ranking member, echoed Warner’s comments that encryption issues “will ultimately need to be resolved by Congress, the Administration and industry, rather than the courts alone.”

“At the moment, we are far from any consensus,” Schiff said in a statement, “but the court’s decision will likely accelerate our consideration of how to weigh the competing privacy, security and competitiveness issues.”

Wyden pointed out that the United States was in danger of setting a troubling global precedent with Tuesday’s ruling.

“Why in the world would our government want to give repressive regimes in Russia and China a blueprint for forcing American companies to create a backdoor?” he said. “Companies should comply with warrants to the extent they are able to do so, but no company should be forced to deliberately weaken its products. In the long-run, the real losers will be Americans’ online safety and security.”

Update 3:10pm CT, Feb. 17: Comment from Adam Schiff added to story.

Update 6:02pm CT, Feb. 17: Comment from Zoe Lofgren added to story.

Photo via Speaker John Boehner/Flickr (PD) | Remix via Max Fleishman