Updated

For years, he lived a solitary life amid the expansive wilderness of Utah as he ransacked cabins and trekked hundreds of miles alone on his snowshoes with a rifle slung over his shoulder.

For most of the next decade, he'll live behind bars in a federal penitentiary.

Troy James Knapp, known by many as the "Mountain Man," agreed Monday to a package of plea deals on burglary and weapons charges in state and federal courts, closing dozens of criminal cases against him in seven Utah counties.

Knapp, 46, was sentenced in U.S. District Court in St. George to 10 years and six months in prison on federal weapons charges that stem from him firing shots at agents before he surrendered last year in April last year in the snowy mountains of central Utah.

He also pleaded guilty to 10 felony burglary counts on state charges, with each state conviction drawing a sentence of one to 15 years and a $10,000 fine.

State court Judge Eric A. Ludlow ran each sentence concurrent with the other and the federal sentence, and waived the money amount. Knapp's federal and state defense attorneys said he was indigent.

He will receive credit for the 14 months he has already served in jail.

When he finishes his time in federal prison, state officials will determine whether he spends any more time behind bars. But prosecutors and Knapp's attorneys, including Deputy Federal Public Defender Kathryn Nester, said the intent was for Knapp to serve his entire sentence in federal prison.

The plea deals mark the end of the mysterious story of an unknown California fugitive who became a sensation in Utah as he raided cabins, stealing guns, whiskey and supplies.

U.S. District Judge Ted Stewart commented that Knapp should write a book about his experiences, and told him that he would have plenty of time to do it in prison.

Knapp declined to speak in federal court and when asked by Ludlow in state court if he had anything to say, Knapp said: "No, thank you."

Outside court, his attorney Jay Winward said, "That will be his last word, 'Thank you.' And he will live a quiet life."

After his arrest last year, Knapp fired his defense attorney and defiantly told a judge he would represent himself. But U.S. Assistant Attorney Matthew Bell said Knapp has been cooperating with authorities since agreeing to the plea deal this spring.

Knapp helped authorities them find 16 weapons he had stored away in four locations in four different counties. That included 13 handguns, two rifles and 1 one shotgun, Bell said.

Winward said all weapons Knapp stole during his years on the run had been accounted for.

His attorneys said the weapons were used for survival and protection against wild animals and never to "scare, threaten or use against citizens," although they conceded he was convicted of firing at the federal agents who apprehended him.

Knapp was born in Saginaw, Michigan, and got into trouble with the law early. As a teenager, he was convicted of breaking and entering, passing bad checks and unlawful flight from authorities, according to court records. Knapp drifted across the country and ended up in prison in California for burglary. He fell off the radar in 2004 when he "went on the run" while on parole.

In 2007, southern Utah authorities began investigating a string of cabin burglaries in southern and central Utah they believed were tied to one person. It wasn't until early 2012 that they identified Knapp as the suspect from cabin surveillance photos and fingerprints lifted from a Jim Beam bottle in one cabin.

In one photo, he was wearing camouflage, a rifle was slung over his shoulder and he had purple-colored aluminum snowshoes on his feet.

Authorities say Knapp spent winters holed up in snowbound cabins, sleeping in the owners' beds, eating their food and listening to their AM radio for updates about the manhunt. In summer he retreated deep into the woods with a doomsday supply of guns, dehydrated foods, radios, batteries and high-end camping gear.

Knapp's signature clues were rumpled bed sheets and an empty bottle of whisky, authorities said. Sometimes he left notes taunting authorities, including one that warned a sheriff that he was "gonna put you in the ground!" Other times, he left thank you notes. In one break-in in Garfield County, police say Knapp cooked some beans and left a note in the cabin log that said "Thanks for the hospitality, Troy James the red head."

After years of being unable to catch him, authorities finally closed in on Knapp around Easter 2013 by using some of his own tactics. After tracking him by snowshoes for three days, dozens of officers converged on him in snowmobiles and a snowcat, flushing him out of the cabin. He fired several shots at officers and a helicopter, and tried to flee on snowshoes before being caught.