El Chapo’s cocaine supplier, whose testimony helped seal the famed drug lord’s fate, got one step closer to freedom Monday when a judge sentenced him to 20 years — most of which he’s already served.

Colombian drug lord Juan Carlos Ramírez Abadía will likely be out of prison within a year, after Brooklyn Federal Court Judge Brian Cogan handed down the sentence.

The 60-year-old cartel leader, who was arrested in Brazil in 2007 and extradited to the U.S. a year later had originally signed a cooperation agreement in exchange for a 25-year prison term — but that was before anyone realized Chapo would be captured and go to trial in 2018.

“It just wasn’t foreseeable how valuable this defendant was going to be. Nobody knew that he was going to take the stand at the trial and that he would be such a pivotal witness,” Cogan said.