NEW YORK -- FBI Director James Comey said government and the tech industry need to sort out their differences over encryption before "something terrible happens" that would make productive conversations impossible.

Acknowledging that talks will probably have to wait until after a new president takes office next year, Comey said that it's up to the American people -- not the FBI or the tech companies -- to decide how to resolve the issue. But before making that decision, people need to understand the cost of absolute privacy.

"At some point encryption is going to figure into a major event in this country," Comey said. "We've got to have this conversation before that happens, because after that, the time for thoughtful reflection will be significantly reduced."

For its part, Comey said the FBI is collecting encryption-related data from its cases, with the expectation that the debate will resurface next year. For example, in the first half of this fiscal year, which ran from October to March, Comey said the FBI received 4,000 smartphones and had no way of getting into 500 of them, because of the encryption involved.

Comey made the comments Tuesday at the International Conference on Cyber Security in New York, an event jointly held by the FBI and Fordham University. He added that encryption remains a tough issue, because it involves a conflict between the key American values of privacy and security.

"Nobody has the high ground. Nobody is the Devil," he said. "In this conversation, we all share the same values."

The encryption debate took center stage earlier this year after the FBI demanded that Apple Inc. help it access a locked iPhone used by one of the attackers in December's shootings in San Bernardino, California, which left 14 people dead.

Apple, backed by the vast majority of the tech industry, vowed a court fight, saying that doing so would leave its phones inherently insecure and vulnerable to similar future requests from the U.S. and other governments, but the matter was ultimately dropped after a third-party provided the FBI with a way to access the phone's information.

Comey said Tuesday that he would have preferred that the matter be handled privately, but understood Apple's need to litigate the matter. He added that he was "happy" that the FBI was able to buy a solution to the problem and avoid a longer court battle.

Meanwhile, the FBI, other members of law enforcement and some members of Congress, have called for legislation mandating the use of so-called "back doors" into encrypted devices.

But most of the tech industry, along with privacy advocates and civil libertarians, counter that creating a back door would undermine security and privacy for everyone, putting everything from national security to global e-commerce at risk of being hacked.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)