A self-described computer whiz has told jurors 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.

Christian Rodriguez, 32, returned to the witness stand in Brooklyn for the second day on Thursday, as the federal trial of Guzman continued on charges of trafficking drugs to the U.S. as the 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.

Prosecution witness Rodriguez who said he worked for Guzman, 61, from 2008 to 2012 and built a system allowing members of the cartel to communicate securely using private servers, Nokia phones and Blackberries.

Joaquin 'El Chapo' Guzman, left, poses with an unidentified man in an evidence photo. Guzman's IT guru returned to court to testify on Thursday

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.

Rodriguez said he handled Guzman's requests to install spyware on about 50 'special phones' he wanted to track. The software allowed Guzman to monitor users' calls and texts, and even to turn on a phone's microphone and record at any time without the user's knowledge.

The technician said he heard from associates of Guzman that their boss treated the technology 'like his toy,' often using it to hear what people said about him immediately after he called them.

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.

In this courtroom sketch Joaquin 'El Chapo' Guzman, center, sits next to his defense attorney in November. The trial is expected to continue on for several more weeks

Emma Coronel Aispuro (right), who was crowned the 2007 Coffee and Guava Queen of Durango, was present in court again on Thursday

Guzman's wife did not react in court this week as her text messages with him were read. She is seen leaving the courthouse on Thursday

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 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.

In a move to protect Rodriguez, court sketch artists have been ordered not to draw his face, and photos of him introduced into evidence have been pixelated.

Among the cartel communications presented in court this week were Guzman's text messages to his beauty queen wife Emma Coronel Aispuro, in which they fussed over their twin daughters, touched on logistics for drug smuggling and shared encouragement as he fled a raid by Mexican authorities on a mansion in the resort town of Cabo San Lucas, Baja.

Recaptured drug lord Joaquin 'El Chapo' Guzman is escorted by soldiers at the hangar belonging to the office of the Attorney General in Mexico City, Mexico, January 8, 2016

On the day of the raid, Guzman told his wife about the escape in one in several messages shown to jurors at the trial in federal court in Brooklyn.

'It all happened very fast,' Guzman wrote, according to government translations. 'I saw them pounding on the door next door, but was able to jump out.'

Guzman said in the messages that he needed a new set of clothes, shampoo and some black dye for his mustache.

'I love you, love,' he wrote. 'Talk to you soon.' She responded at one point: 'I hope so darling.'

In an earlier exchange, Guzman described one of his daughters as 'fearless,' adding, 'I'm going to give her an AK-47 so she can hang with me.' The daughter was then six months old.

Coronel Aispuro, who was crowned the 2007 Coffee and Guava Queen of Durango, was present in court again on Thursday.

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