Prosecutors in the U.S. trial of Joaquin "El Chapo" Guzman on Wednesday shared with jurors text messages they said the accused Mexican drug lord sent to his wife and apparent mistress in which he discussed narrowly escaping from a raid and joked about arming his 18-month-old daughter with an assault rifle.

The messages from early 2012 were read by FBI special agent Steven Marston, on his second day testifying in Brooklyn federal court. Marston explained U.S. authorities were able to obtain them by searching records collected by a spy software Guzman himself had ordered installed on phones used by his wife, Emma Coronel, and by another woman, Agustina Cabanillas.

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