WASHINGTON -- A U.S. magistrate has ordered Apple to help federal investigators hack into an iPhone belonging to one of the shooters in San Bernardino, California.

The ruling by Magistrate Judge Sheri 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 until it finds the right one.

By default, Apple has encrypted its iPhones to allow them only to be accessed using a passcode.

Get Breaking News Delivered to Your Inbox

U.S. Attorney Eileen M. Decker released a statement to CBS News senior investigative producer Pat Milton in response to the court order.

"Since the terrorist attack in San Bernardino on December 2, 2015, that took the lives of 14 innocent Americans and shattered the lives of numerous families, my office and our law enforcement partners have worked tirelessly to exhaust every investigative lead in the case," the statement read. "We have made a solemn commitment to the victims and their families that we will leave no stone unturned as we gather as much information and evidence as possible. These victims and families deserve nothing less. The application filed today in federal court is another step - a potentially important step - in the process of learning everything we possibly can about the attack in San Bernardino."

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 police gun battle.

Last week, FBI Director James Comey testified before the Senate Intelligence Committee, and cited the San Bernardino case as an example of how encryption is affecting counterterrorism efforts.

But he said the dilemma of bad guys "going dark" is mostly affecting state and local law enforcement officials who are trying to solve murder, drug and car accident cases.

Companies are increasingly making devices such as cellphones with encryption that allows only the people communicating to read the messages.

Comey said it's a big problem when law enforcement armed with a search warrant can't open a phone, even when a judge says there's probable cause to have it opened.

The man who bought the rifles used in the attack, Enrique Marquez Jr., has pleaded not guilty to charges in a federal indictment accusing him of conspiring with Farook and to provide material support to terrorists.

The White House has called on the tech industry for help in disrupting the Islamic State of Iraq and Syria (ISIS) and other terrorist groups. Investigators say the San Bernardino shooting was inspired by ISIS.