Facebook executives told Attorney General William Barr that the company would not provide law enforcement with investigative access to its encrypted messaging products ahead of a senate hearing on encryption on Tuesday.

In a letter, WhatsApp and Messenger heads Will Cathcart and Stan Chudnovsky, respectively, said that any “backdoor” access into Facebook’s products created for law enforcement could be used by bad actors for nefarious purposes. For this reason, Facebook denied Barr’s request to make its products more accessible.

“The ‘backdoor’ access you are demanding for law enforcement would be a gift to criminals, hackers and repressive regimes, creating a way for them to enter our systems and leaving every person on our platforms more vulnerable to real-life harm,” the Facebook executives wrote. “People’s private messages would be less secure and the real winners would be anyone seeking to take advantage of that weakened security. That is not something we are prepared to do.”

Earlier this year, Facebook’s CEO Mark Zuckerberg announced that the company would pivot heavily into end-to-end encrypted messaging. The underlying infrastructure of its three messaging products — Instagram, WhatsApp, and Messenger — would be tied together and made more private.

In October, the Justice Department took issue with Facebook over this privacy announcement, suggesting that the company’s plan would benefit criminals, primarily sex traffickers and pedophiles. “Companies should not deliberately design their systems to preclude any form of access to content even for preventing or investigating the most serious crimes,” Barr said.

Facebook’s Tuesday letter was sent in response to Barr’s October inquiry and came ahead of a Senate Judiciary hearing on encryption. In his opening statement, Chairman Lindsey Graham (R-SC) told Apple and Facebook representatives that he appreciates “the fact that people cannot hack into my phone,” but encrypted devices and messaging create a “safe haven” for criminals and child exploitation.

At the hearing, Facebook’s director of messaging privacy, Jay Sullivan, told senators that the company thinks “it is critical that American companies lead in the area of secure and encrypted messaging,” because, if not, companies originating in foreign countries would provide the same services. If so, Sullivan suggests, those companies would be further out of reach and uncooperative with US law enforcement officials. Facebook and other big tech companies have repeatedly made similar statements regarding foreign governments, primarily China, when arguing against broader regulatory threats involving data privacy and content moderation.