(CNN) Thousands of people have been on the hunt for treasure in the Rocky Mountains since a man hid a chest with gold and rare objects there nearly a decade ago. But Montana law enforcement issued a warning to treasure hunters on Tuesday that it could be a deadly pursuit.

"In the last couple years, two people have died, two have been rescued near death, several have had run-ins with local and federal law enforcement, and one told his wife today he was injured but not where he was," the Gallatin County Sheriff's Office posted on Facebook Tuesday. "These people were all near Yellowstone National Park and they were all looking for the Forrest Fenn treasure."

The Teton Range, a mountain range of the Rocky Mountains, is seen as the sun rises.

Forrest Fenn is a New Mexico man who left behind a treasure chest filled with gold, rubies, emeralds and diamonds in the Rocky Mountains in 2010. He said he wanted to inspire people to explore nature and give hope to people affected by the Great Recession.

Fenn said a poem he wrote contains nine clues for locating the chest.

But Gallatin County Sheriff Brian Gootkin said Tuesday that some hunters in their eagerness to find the booty may be giving their loved ones only a vague sense of their location, protecting their competitive edge but also making it difficult for them to be rescued.

Read More