For years, former Harrisburg, Pa., Mayor Stephen Reed scoured auction houses and antique shops around the country, buying up rare and expensive artifacts he planned to house in a museum dedicated to America’s Wild West.

The dream was to turn his city of 50,000, where he served as mayor for 28 years, into a central Pennsylvania tourist hub, and the museum was the key. Using public money, Reed ultimately spent more than $8 million on some 10,000 items. His purchases included a set of four stagecoach harnesses ($10,000), a Billy the Kid poster ($1,000), and a Ford’s Theater bill from the night President Lincoln was assassinated ($14,900), as The Washington Post has reported.

Plans for the museum were eventually abandoned, and Reed, who was voted out of office in 2009, was indicted in 2015 on hundreds of charges involving artifacts in his collection, which prosecutors said he held on to at the city’s expense.

On Monday, just as jury selection was set to begin in his trial, Reed pleaded guilty to 20 counts of receiving stolen property, the Associated Press reported. All of them related to photographs or documents, together worth about $19,000, prosecutors said.

Reed, 67, admitted to the charges because he is suffering from prostate cancer and felt it was the right thing to do, according to his attorney, Henry Hockeimer Jr.

“We think this is an opportunity now to move on with his life and get the treatment he needs for his illness,” Hockeimer told the AP.

In a separate statement, Reed said he accidentally wound up taking some of the artifacts with him when he left office.

“How they got into some box when moving out of office seven years ago, I don’t know,” Reed said, according to the AP. “My guess is they were thrown in with a bunch of similar things in the haste of getting everything packed.”

Sentencing is set for Friday, and Reed faces up to nine months in prison, according to PennLive.

“We think that this achieves justice for not only the commonwealth, but the city of Harrisburg,” Joe Grace, spokesman for the state attorney general’s office, told the AP.

Reed was initially charged with 499 counts ranging from corruption to misapplication of entrusted property, but a judge threw out more than half of them because the statute of limitations had expired. Prosecutors eventually filed 114 charges against him.

Reed’s obsession with Wild West memorabilia was well known. A PennLive profile from 2015 described his workspace:

For much of his 28 years as mayor, a visit to Reed’s dimly-lit City Hall office meant two things: Encountering a thick haze of cigarette smoke and being surrounded by a bevy of Civil War, Native American and Old West artifacts, which were crammed into both the mayor’s conference room.

Once dubbed Harrisburg’s “mayor for life,” Reed received praise for diversifying business in the city — he even brought in a minor league baseball team — and revitalizing its downtown.

In the 1990s, building a network of museums became a core part of Reed’s development strategy. His proposal called for five facilities, but only one, a Civil War museum, was ever constructed.

The Wild West museum was Reed’s white whale, and over the years, he used public funds from a city bond-issuing agency to amass a huge collection of pieces. He became a regular face among antique dealers nationwide, spending freely on trips to Colorado, Arizona, New Mexico and elsewhere. He almost always paid full price for the items, some of which were later revealed to be fakes, as PennLive has reported. At one point, his collection included a Wyatt Earp revolver, a Wells Fargo stagecoach and a “vampire hunter’s set.”

Over the course of 15 years, he spent $8.3 million. For Reed, it was all for a greater good.

“I’ve repeatedly stated over the years the long-standing plan, as part of the city’s overall economic development program, is to create national, first-class facilities to attract and retain business, jobs, residents and visitors,” he told the AP in 2003.

After plans for the museum were scrapped and Reed was voted out, a grand jury was convened to investigate. In the meantime, the city began selling many of the items, eventually recovering about $4.4 million.

When Reed was charged in 2015, the grand jury’s report said he had an “almost pathological preoccupation” with collecting Wild West artifacts, which he was accused of keeping as personal possessions on Harrisburg’s dime.

A June 2015 raid on Reed’s rowhome had an almost surreal quality to it. Local news reports from the time described nearly a dozen investigators carrying out a taxidermied wolf, leather horse saddles, a totem pole, a wagon wheel and other items, and loading them into a white moving truck. One reporter noted that some investigators were wearing paper masks and that the smell of cat urine wafted into the street every time they opened the front door.

After his guilty plea Monday, Reed called his transgressions an “error” and said he was proud of his accomplishments in more than a quarter-century as Harrisburg’s mayor.

“Today’s proceeding does not, in any way, affect nor take away from any of that progress,” he said.