(Reuters) - Attorney General Jeff Sessions on Thursday accused technology companies of failing to adequately help federal investigators access encrypted communications, saying over the past year that the FBI was blocked from accessing nearly 7,500 mobile devices.

Sessions criticized the technology sector in a speech in New York City, just two days after Sayfullo Saipov, an Uzbek immigrant, allegedly drove a truck down a lower Manhattan bike path, killing eight people and injuring 11. Saipov said he was inspired by Islamic State videos, according to investigators.

Sessions, speaking at the U.S. attorney’s office not far from the site of the attack, addressed the tragedy by offering his condolences.

He then laid out a three-point plan to combat terrorism more generally, which he said should include new immigration restrictions, improved access to electronic communications and continued efforts to “aggressively surveill non-citizen terrorists overseas.”

“Terrorists should know: This administration will use all lawful tools at our disposal,” Sessions said, saying such tools will include using both federal courts and military proceedings at Guantanamo Bay prison in Cuba to prosecute terrorism suspects.

“If anyone has any doubt about that, they can ask the more than 500 criminals whom the Department of Justice has convicted of terrorism-related offenses since 9/11, he said, referring to the Sept. 11, 2001, attacks on New York and Washington. “And they can ask the dozens of enemy combatants in Guantanamo Bay.”

Sessions did not say whether he thought that Saipov should be sent to Guantanamo, though he did voice support for a proposal by President Donald Trump to scrap a diversity visa program and replace it with a merit-based system.

Slideshow ( 2 images )

On Wednesday, Trump said he would consider sending Saipov to a military prison at Guantanamo. No detainee has been sent to there since 2008.

Sessions on Thursday also harshly criticized Silicon Valley, saying technology companies too often “refuse to cooperate with law enforcement or even to comply with court orders.”

As an example, he cited a 2015 terrorist incident in Garland, Texas, after two gunmen opened fired with assault rifles at an exhibit featuring caricatures of the Prophet Mohammed.

Sessions said one of the terrorists had sent more than 100 instant messages to another terrorist overseas.

“What we don’t know, however, is what he said - because those messages are encrypted,” he said.

The Justice Department in recent weeks has been signaling it plans to take a tougher stance with technology companies over accessing encrypted data.

Last month, Deputy Attorney General Rod Rosenstein also discussed the topic, and suggested attempts to negotiate with the tech sector were a waste of time because they valued profit over stopping crime.