LAW ENFORCEMENT officials deserve to be heard in their recent warnings about the impact of next-generation encryption technology on smartphones, such as Apple’s new iPhone. This is an important moment in which technology, privacy and the rule of law are colliding.

Apple announced Sept. 17 that its latest mobile operating system, iOS 8, includes encryption so thorough that the company will not be able to unlock it for law enforcement. The encryption is to be set by the user, and Apple will not retain the key. Google’s next version of its popular Android operating system also will be unlockable by the company. Both insist they are giving consumers ironclad privacy protection. The moves are in large part a response to public worries about National Security Agency surveillance of Internet and telephone metadata revealed by former government contractor Edward Snowden.

What has the law enforcement community up in arms is the prospect of losing access to the data on these smartphones in cases where they have a valid, court-approved search warrant. The technology firms, while pledging to honor search warrants in other situations, say they simply won’t possess the ability to unlock the smartphones. Only the owner of the phone, who set up the encryption, will be able to do that. Attorney General Eric H. Holder Jr. said this could imperil investigations in kidnapping and other cases; FBI Director James B. Comey said he could not understand why the tech companies would “market something expressly to allow people to place themselves beyond the law.”

This is not about mass surveillance. Law enforcement authorities are not asking for the ability to surveil everyone’s smartphone, only those relatively few cases where there is a court-approved search warrant. This seems reasonable and not excessively intrusive. After all, the government in many other situations has a right — and responsibility — to set standards for products so that laws are followed. Why not smartphones? Moreover, those worried about privacy can take solace from the Supreme Court’s decision in June in Riley v. California, which acknowledged the large amount of private information on smartphones and said a warrant is generally required before a search.

Law enforcement will not be entirely without tools in criminal investigations. Data stored in the “cloud” and other locations will still be available; wiretaps, too. But smartphone users must accept that they cannot be above the law if there is a valid search warrant.

How to resolve this? A police “back door” for all smartphones is undesirable — a back door can and will be exploited by bad guys, too. However, with all their wizardry, perhaps Apple and Google could invent a kind of secure golden key they would retain and use only when a court has approved a search warrant. Ultimately, Congress could act and force the issue, but we’d rather see it resolved in law enforcement collaboration with the manufacturers and in a way that protects all three of the forces at work: technology, privacy and rule of law.