Christopher Wray, director of the Federal Bureau of Investigation (FBI) testifies on Worldwide Threats during a Senate Select Committee on Intelligence hearing on Capitol Hill in Washington, DC, January 29, 2019.

Facebook could soon become a "dream come true for predators and child pornographers" if it follows through with its plans to make user messages inaccessible to law enforcement, according to FBI Director Christopher Wray.

At a "Lawful Access Summit" hosted by the Department of Justice on Friday, Wray warned that Facebook's plans to integrate and encrypt its three messaging services would pose a grave threat to the ability of law enforcement to catch child predators. At the moment, Facebook is the top referrer of tips to the National Center for Missing and Exploited Children, according to Wray, providing 90% of its 18 million tips each year.

With encryption, Facebook would no longer be able to access the content of messages between its users, only metadata such as time stamps showing when messages were sent. Wray said most of the tips Facebook provides are based on content, not metadata. A recent New York Times investigation found that law enforcement has a harder time tracking down child pornography shared through encrypted technology.

"It's hard to overstate how perilous this is," Attorney General William Barr said of encryption later on at the summit. "This technology is quickly extinguishing our ability to detect and prevent a wide range of criminal activity."

The summit comes as Barr and officials from the U.K. and Australia called on Facebook to halt its encryption plans until they can determine it will not harm public safety.

Facebook did not immediately respond to a request for comment on Wray's remarks. In response to Barr's letter, a Facebook spokesperson told CNBC on Thursday that the company has been consulting with experts in child safety as well as governments and other tech companies to ensure its newly encrypted services are secure. Facebook "strongly oppose[s] government attempts to build backdoors because they would undermine the privacy and security of people everywhere," according to the statement.

Several popular messaging services, including Signal and Apple's iMessage, use encryption by default.

At Friday's event, Wray said law enforcement is not advocating for a "back door," calling the term a "straw man."

"We, the FBI and our state and local law enforcement partners, we go through the front door with a warrant from a neutral judge only after we've met the requirements of the Fourth Amendment," Wray said.

"We would be happy if companies providing the encryption keep the keys," Barr said. "What we are asking is that some responsible party have the keys so that when we can demonstrate a lawful basis probable cause that harms are being committed, we can gain access to that evidence."

The FBI came head to head with Apple in 2016 over a similar case. At the time, a federal judge asked Apple to help the FBI unlock the phone of the shooter in the 2015 San Bernardino attack, but Apple CEO Tim Cook called the order "dangerous," saying it could allow the government to overstep in future cases and demand that technology companies surveil users. In the end, the Department of Justice said it was able to access the phone's data without Apple and asked the judge to drop the case.

Facebook's encryption plans also come at a time of increasing antitrust scrutiny on the company that will likely explore its acquisitions of WhatsApp and Instagram, two services that would be included in the integration. Antitrust experts have speculated that integrating the messaging services would make it harder to unscramble the eggs if antitrust enforcement were to occur.

Subscribe to CNBC on YouTube.

WATCH: Why Facebook's business model is only now coming under fire