Throughout the grueling journey, Mr. Guzmán was “always very calm, very sure, very tranquil,” Mr. Rodriguez said.
When a prosecutor asked the young techie how he felt being on the lam, he answered, “very badly.”
After that experience, Mr. Rodriguez said he decided to put some “distance” between himself and Mr. Guzmán’s organization, training other technicians to run the cartel’s day-to-day communications. Shortly after, he recounted, the F.B.I. launched a covert operation to secure his cooperation.
In February 2010, an F.B.I. agent testified Tuesday, an undercover officer posing as a Russian mobster met Mr. Rodriguez in a Manhattan hotel. The officer said he wanted the I.T. expert to devise a way for him to speak with his associates without law enforcement listening in.
The following year, Mr. Rodriguez said on Thursday, two other federal agents approached him in Bogotá, Colombia, saying they knew he worked for Mr. Guzmán and telling him he was “in serious trouble.”
That same day, Mr. Rodriguez said, he agreed to become a government informant. Over the next several months, he said he installed recording software in Mr. Guzmán’s network that automatically sent copies of the kingpin’s calls to the F.B.I. each day at midnight. Mr. Rodriguez also gave the bureau the user names and passwords of Mr. Guzmán’s FlexiSPY accounts, allowing agents to read — almost in real time — the intimate and incriminating texts he sent his romantic partners.
All this came crashing down in 2012 when Mr. Rodriguez intercepted a phone call between two of Jorge Cifuentes’s siblings in which he heard them saying they had figured out that El Chapo’s tech guy was working with the Americans. After fleeing to the United States, Mr. Rodriguez said he had a “nervous breakdown” within a year. He was hospitalized and treated with electroconvulsive therapy.
This week, he looked better, if not completely fine, telling jurors he was now on medication and seeing a psychiatrist.
As he finished his testimony, Mr. Rodriguez left the witness stand and walked out the courtroom door, nervously avoiding Mr. Guzmán’s gaze.