A treasure hunter has been sentenced to six months' prison for digging inside Yellowstone National Park cemetery.

Rodrick Dow Craythorn was charged with damaging federal property, illegal excavation and trafficking in archeological resources.  The 52-year-old from Syracuse, Utah, dug 17 holes and damaged several graves. Prosecutors said Craythorn began his treasure hunt in late 2019.

Craythorn pleaded guilty to all charges. Craython was also asked to pay $31,566 in restitution.

"To the National Park Service, the people of the U.S., and my family, I am truly sorry. I was motivated by the thrill of possibly finding a treasure and my obsession clouded my judgment," Craythorn said in a statement.

Yellowstone superintendent Cam Sholly said the case was the most "significant investigation of damage to archaeological resources" in the park. The cemetery is listed on the National Register of Historic Places. The cemetery contains at least 54 graves dug between 1888 and 1918.

Prosecutors said Craythorn was looking for a hidden treasure chest reportedly stashed by antiquities dealer Forrest Fenn in the Rocky Mountain backcountry. The chest allegedly contained gold, rare coins and other valuables estimated to be valued at $1 million.

Fenn hinted at the location of the buried treasure in a poem written in a book he had published. For nearly a decade, thousands have roamed the mountains inside the world's first national park in search of treasure.

In his poem, Fenn indirectly said that the treasure was located north of Santa Fe in the Rocky Mountains. Over the past years, emergency workers had to rescue lost or injured treasure seekers. At least six were killed attempting to find the treasure.

Before he died last year aged 90, Fenn said his treasure had already been found. His grandson confirmed in late December that the person who found the treasure was a 32-year-old medical student from Michigan.