The refusal of Apple to unlock the iPhone of the terrorist who killed more than a dozen people in San Bernardino, California has triggered a national debate. But NY1's Criminal Justice Reporter Dean Meminger says Apple is facing a similar legal challenge in our city.

Apple's battle with law enforcement over unlocking iPhones is playing out in the Manhattan and Brooklyn federal courts. 

The Brooklyn case is about a convicted drug dealer's phone that prosecutors want to access.    

Professor Joel Reidenberg, an expert at Fordham University's Center on Law and Information Policy, says elected officials should settle the issue.

"That congress really ought to be doing rather than a magistrate judge in Brooklyn, a magistrate judge in California, a couple judges here or there. it is really a national policy choice," Reidenberg said.

In the Brooklyn matter, Judge James Orenstein asked Apple to list other cases in which federal prosecutors have asked the company to unlock iPhones. 

Apple then disclosed nine cases since October - two in Manhattan and another in Brooklyn, that one involving two phones.

This week, Attorney General Loretta Lynch told a Senate subcommittee judges have the right to order Apple to unlock people's personal phones.

"And if the government needs the assistance of third parties to insure the search is actually conducted, judges all over the country and on the supreme court have said that those parties must assistance if it is reasonably within their power to do so," Lynch said.

The NYPD's Counterterrorism Bureau says smart phones pass codes that can't be cracked leave the city and country venerable to terrorists and criminals.

"Do we want to create an army of devices where they are impenetrable to a search warrant signed by a court," said NYPD Deputy Commissioner for Counterterrorism and Intelligence John Miller.

"The answer is going to be up to the American people, but it probably should be decided by someone other than just Apple."

Professor Reidenberg agrees, but warns creating ways to bypass phone security can lead to violations of privacy.

"Create backdoors, create security venerabilities in your technologies so that law enforcement can exploit those venerabilities, that presents a whole different question," Reidenberg said.

On Tuesday, Apple, the FBI director and Manhattan DA will testify before Congress about balancing these security and privacy concerns.