A career prosecutor who took down one of the region's most ruthless drug lords has been selected to lead the office after a tumultuous fight.