Updated

Attorney General Loretta Lynch on Wednesday defended the FBI’s push to access a locked and encrypted iPhone in its investigation of the San Bernardino attack, saying judges at all levels have held such companies “must assist if it is reasonably within their power to do so” – and suggesting Congress does not need to get involved as Apple wants.

Lynch’s comments come as Apple prepares to tell a federal judge this week in legal papers that its fight with the FBI over accessing the iPhone should be kicked to Congress, rather than decided by courts.

But Lynch used testimony Wednesday before a House appropriations subcommittee to lay out the DOJ position that courts already have found companies must assist in opening devices.

“If the government needs the assistance of third parties to ensure that the search is actually conducted, judges all over the country and on the Supreme Court have said that those parties must assist if it is reasonably within their power to do so," she said, without mentioning Apple by name. "And that is what we have been asking, and we owe it to the victims and to the public whose safety we must protect to ensure that we have done everything under the law to fully investigate terrorist attacks on American soil.”

Lynch’s testimony Wednesday suggested she did not feel Congress needs to weigh in.

Apple also is expected to argue that the Obama administration's request to help it hack into an iPhone in the federal investigation of the San Bernardino attack is improper under an 18th century law, the 1789 All Writs Act, which has been used to compel companies to provide assistance to law enforcement.

A lead attorney for Apple, Theodore J. Boutrous Jr., previewed for the Associated Press some of the company's upcoming arguments in the case. Apple's chief executive, Tim Cook, has also hinted at the company's courtroom strategy.

Apple's effort would move the contentious policy debate between digital privacy rights and national security interests to Congress, where Apple -- one of the world's most respected technology companies -- wields considerably more influence. Apple spent nearly $5 million lobbying Congress last year, mostly on tax and copyright issues. Key lawmakers have been openly divided about whether the government's demands in the case go too far.

Magistrate Judge Sheri Pym in California ordered Apple last week to create specialized software to help the FBI hack into a locked, county-issued iPhone used by a gunman in the mass shootings last December in San Bernardino, California. Syed Farook and his wife, Tashfeen Malik, killed 14 people at an office holiday party in an attack at least partly inspired by the Islamic State group.

"The government is really seeking to push the courts to do what they haven't been able to persuade Congress to do," Boutrous said in an AP interview. "That's to give it more broad, sweeping authority to help the Department of Justice hack into devices, to have a backdoor into devices, and the law simply does not provide that authority."

White House spokesman Josh Earnest this week also disputed that Congress should settle the issue and called the government's request narrow. Earnest said the magistrate judge "came down in favor of our law enforcement" after evaluating arguments by Apple and the FBI. Apple hasn't yet made any filings in the case because the Justice Department asked the magistrate to rule before Apple had an opportunity to object.

"Sending complicated things to Congress is often not the surest way to get a quick answer," Earnest said. "In fact, even asking some of the most basic questions of Congress sometimes does not ensure a quick answer."

Apple intends to argue that the 1789 law has never been used to compel a company to write software to help the government.

Michael Zweiback, the former chief of the cybercrimes section of the U.S. Attorney's Office in Los Angeles, said it was highly unusual for the U.S. to ask Apple to give the FBI specialized software that would weaken the digital locks on the iPhone.

"There's a significant legal question as to whether the All Writs Act can be used to order a company to create something that may not presently exist," Zweiback said. He said as a former prosecutor he was sympathetic to the government's case, but he described Apple's arguments as strong and said the issue has broad implications.

"We are not the only ones who are asking for encryption keys," he said. "The Chinese government has made similar demands upon them, the European Union has made similar demands upon them, so the implications are really not even national. They're international in scope."

The Associated Press contributed to this report.