NEW YORK — The lies of U.S. operatives who gathered evidence used to arrest two nephews of Venezuela’s first lady on drug charges threatened to spoil the government’s case Friday as new revelations emerged about a key witness’s use of prostitutes and his work as an informant even as he was dealing drugs himself.

A father-and-son team of surrogate investigators acting on the Drug Enforcement Administration’s behalf testified anonymously at a hearing to decide if evidence against Efrain Campo and Francisco Flores will be tossed out. The evidence includes tape recordings of meetings they staged in Venezuela last year before the men were arrested in Haiti last fall and flown to the United States.

Campo and Flores have pleaded not guilty to conspiring to import 800 kilograms of cocaine into the United States.

A DEA agent testified Thursday that the agency relies on informants in Venezuela rather than sending teams of DEA agents into the South American country.

The most damaging testimony Friday came from the elder informant who said prosecutors were angry when he confessed to them during the lunch break that he had utilized a prostitute twice during a trip in Caracas to meet Campo and Flores, rather than the one time he had previously said.

He said he also acknowledged for the first time that he let a friend of his 34-year-old son be at the scene of three meetings with Campo and Flores in which the informants were supposed to arrange a drug trafficking deal with the men.

The 55-year-old father said he was hoping his testimony would earn him leniency when he is sentenced after pleading guilty last week to charges that he imported and distributed drugs in the United States and lied to the U.S. government.

A defense lawyer told the witness that prosecutors might already have told him that his lies might lead them to rip up his plea agreement and his path to leniency.

“Not that they were going to rip it up but that they were extremely unhappy and were going to closely review everything I’ve told them,” he said in Spanish, using an interpreter.

The informant said he had deceived the U.S. government from 2012 to 2016 by importing drugs into the United States even as he worked as a DEA informant, earning $750,000 since 2003. He said he made another $250,000 to $300,000 cooperating with other South American police authorities.

His son testified earlier in the day that he had earned about $400,000 as an informant, with about half of the money coming from the DEA. His son has pleaded guilty to the same charges as his father.

U.S. District Judge Paul A. Crotty stopped lawyers at one point from repeatedly eliciting lies that had been told by the informants, saying he had his “own assessment.”

“I get the drift,” he said. Of the father, he said it would have to be determined if he was “so used to lying he can’t tell the truth.”