Apple will fight a federal magistrate's order to help the Obama administration break into an encrypted iPhone belonging to one of the shooters in last December's deadly San Bernardino terror attack.

In a statement posted on Apple's website early Wednesday, CEO Tim Cook said the order by U.S. Magistrate Judge Sheri Pym "has implications far beyond the legal case at hand."

"We have great respect for the professionals at the FBI, and we believe their intentions are good," Cook's statement read in part. "Up to this point, we have done everything that is both within our power and within the law to help them. But now the U.S. government has asked us for something we simply do not have, and something we consider too dangerous to create. They have asked us to build a backdoor to the iPhone."

Cook's statement was published hours after Pym's first-of-its kind ruling, a significant victory for the Justice Department in a technology policy debate that pits digital privacy against national security interests.

“Nobody can build a phone that we cannot get in under unique circumstances. Why should Apple be allowed to build a phone that does that?” a federal agent involved in the San Bernardino terror investigation told Fox News. “The right should not supersede our ability to keep people safe. It’s why we are not finding others, encryption, and, specifically in this case, we cannot connect the dots.”

The agent said the phone’s carrier, Verizon, wouldn’t be able to provide authorities with the necessary information.

“The information we need is on that phone and cannot be accessed by Verizon,” the agent said.

FBI Director James Comey told members of Congress last week that encryption is a major problem for law enforcement who "find a device that can't be opened even when a judge says there's probable cause to open it."

The ruling Tuesday tied the problem to the deadliest terrorist attack on U.S. soil since the 2001 attacks on the World Trade Center and the Pentagon. Syed Farook and his wife, Tashfeen Malik, killed 14 people in a Dec. 2 shooting at a holiday luncheon for Farook's co-workers. The couple later died in a gun battle with police.

Federal prosecutors told the judge in Tuesday's court proceeding — which was conducted without Apple being allowed to participate — that investigators can't access a work phone used by Farook because they don't know his passcode and Apple has not cooperated. Under U.S. law, a work phone is generally the property of a person's employer. The judge told Apple to provide an estimate of its cost to comply with her order, suggesting that the government will be expected to pay for the work.


In his statement, Cook said, "this moment calls for public discussion, and we want our customers and people around the country to understand what is at stake."

Apple has provided default encryption on its iPhones since 2014, allowing any device's contents to be accessed only by the user who knows the phone's passcode. Previously, the company could use an extraction tool that would physically plug into the phone and allow it to respond to search warrant requests from the government.

The ruling by Pym, a former federal prosecutor, requires Apple to supply highly specialized software the FBI can load onto the county-owned work iPhone to bypass a self-destruct feature, which erases the phone's data after too many unsuccessful attempts to unlock it. The FBI wants to be able to try different combinations in rapid sequence until it finds the right one.

"The FBI may use different words to describe this tool, but make no mistake," Cook wrote. "Building a version of iOS that bypasses security in this way would undeniably create a backdoor. And while the government may argue that its use would be limited to this case, there is no way to guarantee such control."

It was not immediately clear what investigators believe they might find on Farook's work phone or why the information would not be available from third-party service providers, such as Google or Facebook, though investigators think the device may hold clues about whom the couple communicated with and where they may have traveled.

The couple took pains to physically destroy two personally owned cellphones, crushing them beyond the FBI's ability to recover information from them. They also removed a hard drive from their computer; it has not been found despite investigators diving for days for potential electronic evidence in a nearby lake.

Farook was not carrying his work iPhone during the attack. It was discovered after a subsequent search. It was not known whether Farook forgot about the iPhone or did not care whether investigators found it.

The phone was running the newest version of Apple's iPhone operating system, which requires a passcode and cannot be accessed by Apple, unlike earlier operating systems or older phone models. San Bernardino County provided Farook with an iPhone configured to erase data after 10 consecutive unsuccessful unlocking attempts. The FBI said that feature appeared to be active on Farook's iPhone as of the last time he performed a backup.

The judge didn't spell out her rationale in her three-page order, but the ruling comes amid a similar case in the U.S. District Court for the Eastern District of New York.

Investigators are still working to piece together a missing 18 minutes in Farook and Malik's timeline from Dec. 2. Investigators have concluded they were at least partly inspired by the Islamic State group; Malik's Facebook page included a note pledging allegiance to the group's leader around the time of the attack.

Fox News' Adam Housley and The Associated Press contributed to this report.