Federal Bureau of Investigation director James Comey hit out at Apple and Google over new data-security measures designed to reassure customers wary of government prying.
Google and Apple this month announced they are hardening encryption tactics on devices powered by their mobile operating systems.
The move should mean that even if law enforcement agencies have court-issued search warrants, they will be blocked from getting hold of pictures, messages and other personal data stored on newer Android or Apple smartphones and tablets.
"I am a huge believer in the rule of law," Comey told journalists.
"But I also believe that no one in this country is beyond the law. What concerns me about this is companies marketing something expressly to allow people to place themselves beyond the law."
Comey said the FBI had had initial discussions with Apple and Google about the new security measures. He said law enforcement, with a search warrant, must have access to data on criminals' smartphones.
In a reference to US intelligence leaker Edward Snowden, the FBI head said that in a "post-Snowden world... this is an indication (some corporations) go too far."