The gun that was used to kill Billy the Kid — one of the most infamous outlaws in the American Old West — will be sold at auction next month, more than 140 years after the gunslinger’s death, according to reports.

Bidding for the legendary Colt single-action army revolver is set to begin at $2 million at Bonhams auction house in Los Angeles, where appraisers expect the weapon could fetch $3 million or more on August 27.

On July 14, 1881, Lincoln County Sheriff Pat Garrett of New Mexico used the pistol to shoot Kid in the chest after surprising him in a darkened bedroom, where the fugitive unexpectedly showed up in the middle of the night.

Garrett had acquired the long-barreled gun after seizing it from another member of Kid’s gang whom he previously arrested.

“It was in the hands of both the law man and the outlaw at various times,” Bonhams senior specialist Catherine Williamson said, according to NPR.

More than a hundred years after Kid’s death, the revolver found itself in the hands of a Texas couple — Jim and Theresa Earle — who assembled a prized collection of Western firearms for more than 50 years, NPR reports.

Kid, whose real name was Henry McCarty but who sometimes went by William H. Bonney, reportedly killed eight men before the long arm of the law finally caught up to him and ended his life at age 21.

Kid embarked on a life of crime after he was orphaned at the age of 15, according to legend.

Kid was 18 years old when he shot and killed Sheriff William J. Brady and one of his deputies in Lincoln County, N.M. in April 1878.

More than two years later, in December 1880, Garrett took Kid into custody for the crime.

Four months later, in April 1881, Kid was tried and convicted and sentenced to die the following month, with the presiding judge reportedly telling Kid he would hang until “you are dead, dead, dead.”

But while awaiting execution, Kid killed two sheriff’s deputies and escaped. He evaded capture for more than two months before unwittingly stumbling into Garrett at the Fort Sumner home of Pete Maxwell, one of the bandit’s closest allies.

As time passed, many tall tales emerged that Garrett never shot Kid but actually allowed him to escape, with a number of men coming forward claiming to be Billy the Kid. While the rumors were never proven, the intrigue surround the claims became the premise for the 1988 film “Young Guns” and its sequel “Young Guns II” starring Emilio Estevez as the notorious gunslinger.

In 2008, Bonham sold Billy the Kid’s gun for $64,350.