AN ally-turned-enemy of cocaine kingpin El Chapo has died after suffering a heart attack in his jail cell.

Drugs lord Hector Beltran Leyva died after collapsing with chest pains at a prison near Mexico City – before he could stand trial for his crimes.

The 56-year-old was the last-known leader of the family-run Beltran Leyva cartel and worked closely with El Chapo Guzman’s Sinaloa mob until the 2008 arrest of Hector’s brother Alfredo, who is now serving life in a US jail.

The clans had a falling out and another Leyva brother was said to have ordered the assassination of El Chapo’s son Edgar, who was killed in an attack with assault rifles and hand grenades.

Hector had been in prison since October 2014 after being arrested as he enjoyed a late lunch with his financial adviser at a restaurant in San Miguel dem Allende in the central Mexican state of Guanajuato.

The US government put a $5million bounty on his head before his capture.

Hector was only spared extradition to the US in April 2017 on a technicality.

Since 2016 the kingpin — dubbed El H or El Ingeniero (The H or The Engineer) — had been held in maximum-security federal prison Altiplano, from where El Chapo escaped twice.

Officials confirmed he had died around 4pm local time on Sunday in Toluca’s Adolfo Lopez Mateos Hospital, around an hour after the alarm was raised.

His body will be returned to his family after an autopsy.

Hector and the three brothers who formed part of the Beltran Leyva cartel – Alfredo, Arturo and Carlos – were all born in Badiguarato, Sinaloa, which features in Netflix crime drama Narcos based on the story of Colombian drugs kingpin Pablo Escobar.

Arturo sent the hit squad that gunned down El Chapo’s son before being tracked down by 200 Mexican marines in 2009 and dying in the ensuing shootout.

Carlos, who had the lowest profile of the siblings, was arrested the same year after being stopped while driving with a forged licence and has been in jail ever since.

Hector was formally charged in October 2014 in a Mexican federal court with drug trafficking, money laundering and organised crime offences.

He was yet to be put on trial at the time of his death.

El Chapo – recaptured by soldiers in 2016 after his escape from Altiplano using an underground motorbike on rails – was extradited to the US last year.

His blockbuster trial started last week amid high security in Brooklyn, New York.