NEW YORK (Reuters) - Self-described computer whiz Christian Rodriguez told jurors on Thursday how he had a nervous breakdown from the stress of cooperating with the FBI to hack into the secure communication system he built for accused Mexican drug lord Joaquin “El Chapo” Guzman.

FILE PHOTO: A police vehicle stands outside the Brooklyn Federal Courthouse ahead of the start of the trial of Joaquin Guzman, the Mexican drug lord known as "El Chapo", in New York City, New York, U.S., November 13, 2018. REUTERS/Mike Segar/File Photo

On trial in U.S. federal court in Brooklyn since November, Guzman, 61, was extradited to the United States in 2017 to face charges of trafficking cocaine, heroin and other drugs into the country as leader of Mexico’s Sinaloa Cartel.

The witness testimonies have given a glimpse into the secretive and often violent workings of the cartel, one of the most powerful drug trafficking operations in the world.

It was the second day of testimony for prosecution witness Rodriguez, 32, who said he worked for Guzman from 2008 to 2012 and built a system allowing members of the cartel to communicate securely using private servers, Nokia phones and Blackberries.

The Colombian-born Rodriguez told jurors he was approached in Bogota in 2011 by FBI agents who told him they knew he worked for Guzman and that he was in “serious trouble.” Rodriguez said he agreed to cooperate with them the same day.

He gave the FBI the passwords to the secure servers he built for Guzman, as well as for software he secretly installed on some of his associates’ phones that allowed Guzman to spy on them, Rodriguez has testified.

The value of Rodriguez’s assistance to prosecutors became obvious this week, as jurors were presented with a slew of Guzman’s phone calls and text messages intercepted thanks to his cooperation.

Much of the evidence in the trial so far has consisted of spoken testimony from witnesses whose credibility Guzman’s lawyers have done their best to undermine. Many of the intercepted communications jurors heard this week, however, appear unambiguously to show Guzman discussing high-volume drug trafficking and bribing officials.

Guzman’s lawyers have portrayed their client as a scapegoat for what they have called Sinaloa’s real leader, Ismael “El Mayo” Zambada, who also faces U.S. charges but remains at large.

Rodriguez said he fled to the United States in fear of his life after learning that Guzman’s associates knew he was cooperating with the FBI. He said he later had a nervous breakdown from stress, was hospitalized and underwent electroconvulsive treatment.

Under cross-examination by one of Guzman’s lawyers, Eduardo Balarezo, Rodriguez admitted family difficulties also contributed to his stress and nervous breakdown.

To protect Rodriguez, court sketch artists have been ordered not to draw his face, and photos released of him have been pixelated.

Late in the day, Alex Cifuentes, a member of the Colombian drug trafficking family that Rodriguez said introduced him to Guzman, took the stand. Dressed in prison garb, he said he worked for Guzman from 2007 until his 2013 arrest.

Cifuentes, who pleaded guilty to U.S. drug charges and is cooperating with prosecutors, is expected to continue testifying on Monday.

The trial began Nov. 13 and is expected to last a few more weeks. Guzman faces life in prison if convicted.