Lew Wallace, who wrote 'Ben Hur', crossed paths with Billy the Kid earlier in his career.
"On March 1, 1879, after previous efforts to restore order in Lincoln County had failed, Wallace ordered the arrest of those responsible for local killings. One of the outlaws was William Henry McCarty, Jr. (alias William H. Bonney), better known as Billy the Kid. On March 17, 1879, Wallace secretly met with the Kid, who had witnessed the murder of a Lincoln County lawyer named Chapman. Wallace wanted the Kid to testify in the trial of Chapman's accused murderers, but the Kid had killed others and wanted Wallace's protection from the outlaw gang and amnesty for his crimes. During their meeting, the pair arranged for the Kid to become an informant in exchange for a full pardon of his previous crimes. Wallace supposedly assured the Kid that he would be "scot free with a pardon in your pocket for all your misdeeds." On March 20, the Kid agreed to testify against others involved in Chapman's murder. Wallace arranged for the Kid's arrest and detention in a local jail to assure his safety. After the Kid testified in court on April 14, the local district attorney revoked Wallace's bargain and refused to set the outlaw free.[1] The Kid escaped from jail and returned to his criminal ways, which included killing additional men. The Kid was shot and killed on July 14, 1881 by Pat Garrett who had been appointed by local ranching interests who had tired of his rustling their herds. In the meantime, Wallace had resigned from his duties as territorial governor on March 9, 1881, and was waiting for a new political appointment."
https://en.wikipedia.org/wiki/Lew_Wallace#Territorial_governor_of_New_Mexico