One of the greatest betrayals in mafia history emerged into open court this week at the New York trial of Joaquín “El Chapo” Guzmán, as the former heir-apparent to Guzmán’s Sinaloa federation turned against his own boss, the cartel – and apparently even his own father.

Vicente Zambada Niebla – “El Vicentillo” – is the son of Guzmán’s longtime partner and co-founder of the cartel, Ismael “El Mayo” Zambada García, and was once groomed to take over the business.

But in court on Thursday, he testified for the prosecution.

Zambada Niebla – the cartel’s former operations manager, envoy to politicians and businessmen and logistics supervisor – told the court that he started accompanying his father to planning meetings as a teenager.

“I started realizing how everything was done,” he testified, “and little by little, I started getting involved in my father’s business.”

Zambada Niebla greeted the defendant with a courteous half-smile.

In contrast to the dry, often droll, testimony of previous turncoat witnesses, El Vicentillo gave meandering testimony which nonetheless gave some idea of the scope and depth of his authority: he oversaw importations of cocaine from Colombia into Mexico and onward to Los Angeles and Chicago, which he made his centre of operations.

He described meeting high-level executives from Mexico’s state oil company Pemex, with a view to shipping nearly 100,000kg of cocaine to the US in a tanker owned by the conglomerate, bearing its logo.

Zambada Niebla also alleged that a senior military officer in the Mexican defence ministry and a member of former president Vicente Fox’s security team – were accomplices of the Sinaloa cartel.

Zambada Niebla is a star – potentially crucial – prosecution witness, but a controversial one. He was arrested in 2010 in Mexico City and extradited to Chicago.

But he was never tried, and in April 2014 the DEA unsealed a guilty plea he had made in April 2013 in which he admitted operating a “vast narcotics trafficking conspiracy”. The court documents added that Zambada Niebla was now “cooperating with the United States”.

During the first week of the Guzmán trial, El Vicentillo entered a further guilty plea for related offences, and another agreement to cooperate “on any matter”.

He faces sentencing in March.

Meanwhile, a year-long investigation by El Universal of Mexico City has traced the details of El Vicentillo’s relationship with the DEA, in which he provided information in exchange for a free hand to operate. The DEA has admitted contact with El Vicentillo but denies a deal allowing him to continue trafficking.

All this will make for eventful cross-examination, so far as Judge Brian Cogan will allow, as will the possibility of a variation on the narrative: it is widely believed that El Mayo and Guzmán developed major differences, and that Zambada García betrayed his former partner to Mexican authorities in order to assume sole control over the cartel.

Supporters of this theory argue that Zambada Niebla’s dealings with the DEA and cooperation agreements were – and still are – all part of El Mayo’s plan to take Guzmán down and secure reduced sentences for his son and brother.

That would mean that El Vicentillo’s testimony marks a betrayal of Guzmán – with tacit US cooperation – but not of his father or the organisation.

El Mayo’s brother, Jesús Zambada García, who was the cartel’s accountant until his arrest in 2008, has also testified in the trial.