Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Accused drug lord Joaquin "El Chapo" Guzman kept a close eye on the women in his life, including by installing spyware on phones of his wife and mistress, a witness claimed at Guzman's trial in New York on Wednesday.

Prosecutors in Brooklyn federal court introduced as evidence text messages that Guzman exchanged with his wife, Emma Coronel Aispuro, and a woman who apparently was his girlfriend, Agustina Cabanillas.

FBI special agent Steven Marston told the court that investigators found the messages through spying software Guzman had ordered installed on Coronel and Cabanillas' cellphones.

Guzman is on trial for trafficking cocaine, heroin and other drugs into the country as leader of Mexico’s Sinaloa Cartel.

Before his extradition to the United States, he had engineered two daring prison escapes, including his 2001 breakout from a maximum-security prison in Jalisco, Mexico, leading to more than a decade of freedom.

Guzman and his wife apparently often chatted about the dangers of running a drug cartel, with Coronel worrying she was being watched by police, according to text messages that prosecutors presented to jurors.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Guzman texted to her “vivir una vida normal” — to just lead a normal life, according to the government's evidence.

Coronel sat passively in the gallery but seemed slightly uncomfortable when the government showed chats between Guzman and his apparent mistress Cabanillas.

The girlfriend appeared to help Guzman negotiate business deals and referred to him as “amor,” or my love, in texts shown to jurors.

Guzman narrowly escaped being recaptured one day in 2012, as he recounted in a text message to his wife.

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

The drug kingpin said he needed a change of clothes and black dye for his mustache.

"I love you, love," he wrote. "Talk to you soon."

The wife responded: "I hope so darling."

In another text exchange, Guzman and his wife gushed over their twin daughters, Emmely "Mali" and Maria Joaquina "Kiki" Coronel. The girls were about 18 months old at the time.

"Our Kiki is fearless," he texted Coronel. "I'm going to give her an AK-47 so she can hang with me."