Joaquín “El Chapo” Guzmán’s lawyer claims spending nearly a year in solitary confinement has made the Sinaloa cartel boss paranoid that authorities are “recording” his every move. But he also suspects Chapo’s fears might be justified.

Last month, Chapo’s attorney Eduardo Balarezo filed a pretrial motion (viewable in full below) asking the Justice Department to hand over any evidence against his client that “was derived from eavesdropping through warrantless wireless surveillance.” Balarezo specifically asked for “all evidence obtained pursuant to the National Security Agency’s ‘PRISM’ program,” a secret spy operation revealed by former NSA contractor Edward Snowden in 2013.

In addition to the NSA’s PRISM program, Balarezo requested evidence derived from warrants secretly obtained through the Foreign Intelligence Surveillance Act (FISA) and the use of so-called “Triggerfish” devices, which mimic cell towers to scoop up phone data.

“It’s in the hands of the government. The defense has no way of knowing — I have to ask if it exists.”

At first blush, that might sound like the stuff of a tinfoil hat conspiracy theory. But independent experts who spoke with VICE News about Chapo’s case said it’s entirely plausible that the NSA was involved in the hunt for the world’s most wanted drug lord. And unfortunately for Chapo’s lawyer, the experts also said that, depending on the circumstances, the spying may have been perfectly legal.

Lee Tien, a senior staff attorney at the Electronic Frontier Foundation, which has sued to stop the NSA’s warrantless wiretapping of U.S. citizens, said the rules are different for foreign nationals like El Chapo, who is a citizen of Mexico.

“If they’re not a U.S. citizen or lawful permanent resident, under the current law, it’s sort of open season on them,” Tien said. “They [the government] can do all sorts of surveillance.”

Ahead of Chapo’s court appearance on Wednesday, federal prosecutors responded to Balazero’s request with a letter to the court that essentially said the government is not currently obligated to disclose whether the NSA helped capture the notorious kingpin. The NSA referred VICE News’ questions about the case to the U.S. Attorney’s Office, which said the government’s letter speaks for itself.

It’s not unusual for defense attorneys to go on pretrial fishing expeditions in search of evidence that was obtained illegally and is therefore inadmissible, but Balarezo told VICE News he has “reason to believe the government probably did use some of these techniques.”

“Those things are secret,” Balarezo said. “It’s in the hands of the government. The defense has no way of knowing — I have to ask if it exists, and I would assume, given the profile they’ve created against Mr. Guzmán and the nature of the case, the government probably used all of the tools at their disposal to obtain evidence against him.”

The PRISM program involved secret agreements with companies such as Google, AT&T, Verizon, Microsoft, and Yahoo that allowed the NSA to collect and store detailed information about phone calls, text messages, emails, and other electronic communications between Americans and foreigners. Ostensibly, the program was used for national security purposes — to prevent terrorism, investigate cyber attacks, and perform other counterintelligence operations. But Matthew Green, an assistant professor at the Johns Hopkins Information Security Institute, said it would also be useful for tracking down a fugitive like El Chapo.

“If you were looking for someone’s location info, PRISM would be useful for that,” Green said. “You can lock down a phone so it doesn’t talk to these companies, but it’s hard. And it’s not just El Chapo, it could be anybody who was working with him that wasn’t as careful.”

The NSA isn’t alone in conducting massive, secret spy operations. The DEA alo uses a program called Hemisphere that reportedly gave drug agents access to an “enormous AT&T database that contains the records of decades of Americans’ phone calls,” including phone data from as far back as 1987. There’s also the DEA’s Special Operations Division, which includes members from the CIA, NSA, and two dozen other agencies.

A 2013 Reuters report revealed the division had been “funneling information from intelligence intercepts, wiretaps, informants, and a massive database of telephone records to authorities across the nation.” Leaked DEA training documents later proved that agents were taught to hide their use of classified information with a practice called “parallel construction.” In such cases, DEA agents could use intelligence obtained from the NSA to track a suspect, then cover their tracks with traditional investigative techniques.

In the same motion that requested evidence obtained from the NSA, Chapo’s lawyer sought information about “parallel construction.” Prosecutors responded by stating they will “evaluate whether such information exists and is discoverable.” More broadly, the government said it was “not aware of any intercepted or recorded electronic communications obtained without judicial authorization” in Chapo’s case, with the exception of some evidence against one of his alleged co-conspirators.

Tien, the Electronic Frontier Foundation lawyer, pointed out that the government could have plenty of reasons to conceal how they obtained evidence against Chapo.

“You might have incentives to use that even if you don’t have anything going on that’s illegal, you just want to conceal the fact that NSA helped you or even a foreign government,” he said. “There’s a gazillion scenarios where if you’re the government you have an incentive to do something like parallel construction to hide the providence of the data.”

Despite the likelihood that these techniques were used, the issue of classified evidence was discussed only briefly during Chapo’s court hearing on Wednesday. Judge Brian Cogan noted that his lawyer, Balarezo, had applied for a security clearance to view such evidence, but said it could take up to six months for him to get approval. Chapo’s trial is set to begin on April 18, 2018, which is almost exactly six months away. Cogan acknowledged that until Balarezo can view classified material, he’s basically stuck “shooting in the dark” as he prepares Chapo’s defense.

“I need to know more about records they obtained through intercepts, here or in Mexico,” Balarezo told the judge.

So far, prosecutors have turned over about 90,000 pages worth of evidence against El Chapo. After the hearing on Wednesday, Balarezo told reporters that most of the material “has to do with a lot of loads and shipments of drugs that were seized.”

Chapo faces life in prison if he’s convicted, but Balarezo appears to be laying the groundwork to get him off the hook. The lawyer claims that poor jail conditions and extreme isolation have caused “a marked deterioration” in Chapo’s mental state. Cogan granted permission for Chapo to undergo a mental evaluation, which is set to occur next week.

Balarezo insists he’s not claiming that Chapo is no longer competent to stand trial, but the lawyer is concerned that, in addition to paranoia about being recorded, “his memory is failing” and “he’s not recalling certain things.”