New Yorkers are stuck between unlock and a hard place.

Reacting to a court ruling that forces Apple to access the encrypted iPhone of one of the San Bernadino shooters, most felt their right to privacy trumps the government’s right to data — unless you’re a terrorist.

Preston Mcneely, a 19-year-old student from Brooklyn Heights, said the FBI shouldn’t necessarily have a backdoor, but exceptions should be made for suspected terrorists.

“I wouldn’t like it if they got hold of my information and I think that they shouldn’t be able to do that,” he said. “But if they’re looking for someone like there should be exceptions.”

Computer science student Samuel Zhang said a backdoor should be available to the FBI only on a situational basis.

“Apple has a lot of layers for security for personal information, so I’m not worried,” said Zhang, 18, from Bayside, Queens. “It depends on what type of information the government wants.”

Kiara Davis, 27, said the fear of a potential attack is not enough to warrant handing over her phone under any circumstances.

“We already don’t have any privacy as it is,” said Davis, a singer from Flushing. “If they think someone is a terrorist, they should find another way. I want my privacy. Period.”

Some completely sided with the government.

“Apple is pretty stupid, they’ve got to give the information if it’s a terrorist,” said 68-year-old Alan Batt, a food photographer from Chelsea. “There must be a way to get into the phone of a terrorist. It just doesn’t make sense not to give the FBI information about a terrorist.”

A federal judge in Los Angeles on Tuesday ordered Apple to provide “reasonable technical assistance” to investigators seeking to read the data on an iPhone 5C used by the shooter, withthe government saying that the phone is a crucial piece of evidence in investigating one of the worst attacks in the United States by people who sympathized with Islamist militants.

Apple Chief Executive Tim Cook, however, penned an open letter that argues creating an operating system that gives the FBI a “backdoor” to the company’s data sets “a dangerous precedent” and would put customers at risk for hackers and cybercriminals.

City leaders, however, unequivocally sided with the government yesterday, arguing the potential threat of terrorism outweighs the need for privacy.

“I think terrorist threats and criminal threats threaten their customers much more, to be quite frank with you,” Bratton said, speaking at an unrelated police headquarters news conference. “And this is the crux of the issue ... the profit motive under the guise of protecting the interest of the customers over the interest of government to protect the lives of those customers.”

Yesterday, Sen. Charles Schumer said the heads of Internet and technology companies need to sit down with law enforcement and come up with a lasting solution.

“You can’t just litigate this on a case-by-case basis. It takes too long, it hampers law enforcement,” Schumer said. “We need a solution. And we need a solution that protects privacy rights, but at the same time gives law enforcement the tools they need.”

Mayor Bill de Blasio echoed that sentiment, arguing that companies like Apple are more concerned with profit than national security.

“We all respect constitutional rights, we all understand the sensitivities around privacy,” he said. “But in the end, these companies — whether they mean to or not — are, unfortunately, making it easier for terrorists to do their devilish acts. And it must be stopped.”

White House spokesman Josh Earnest said the Department of Justice was asking Apple for just one device — that of Syed Rizwan Farook, who along with his wife, Tashfeen Malik, killed 14 people and wounded 22 others on Dec. 2 in San Bernardino, California.

Apple’s Cook contested that. “The government suggests this tool could only be used once, on one phone,” Cook said in a statement on Tuesday. “But that’s simply not true. Once created, the technique could be used over and over again, on any number of devices.”

If the federal judge, Magistrate Sheri Pym, rejects Apple’s arguments, the Cupertino, California-based company can potentially appeal her order up to the U.S. Supreme Court.

(With Reuters)