An increasing number of visitors to Yellowstone National Park are being prosecuted for possessing small amounts of medical and recreational pot, which remains illegal on federal land.

Park rangers attribute the trend both to ignorance of federal law and the growing prevalence of legal pot in other states, including neighboring Colorado, which has legal medical and recreational marijuana.

The U.S. Attorney's Office in Cheyenne reports it prosecuted 21 marijuana cases from Yellowstone in 2010 and 52 in 2013. As of Dec. 17, the office had handled 80 cases in 2014.

Those convicted of misdemeanor possession commonly receive a $1,000 fine.

The numbers are small compared to the millions who trek each year to the nation's first national park. The bulk of the 2.2-million-acre park is in Wyoming, with slivers extending into Montana to the north and Idaho to the east.

Tim Reid, the chief ranger, said he believes the increase mirrors the prevalence of pot in society.

Alex Freeburg, a criminal defense lawyer in Jackson, Wyoming, frequently handles marijuana possession cases from Yellowstone. He said his clients often are surprised when they're charged for small amounts of marijuana.

"I think that it's fair to say that it is the legalization in a couple of states. They know it's illegal but they don't think it's a crime," Freeburg said. "There's some sort of disconnect."

The typical marijuana case arises from a traffic stop in which rangers say they smell the drug in the vehicle.

"And most people, most of the time, if a ranger says, `Do you have any marijuana in your car?' they'll say yes," Freeburg said. "In which case, there's not a lot a criminal defense attorney can do for them."

That happened to Gary Godina, an artist from Waipahu, Hawaii, who was cited in Yellowstone in October 2013.

Godina said rangers pulled him over for speeding in a vehicle with Colorado plates and then told him they smelled marijuana. He said he told them he had 3 grams of the drug that he had purchased earlier in Colorado.

"Yeah, I had to go overnight," Godina said. "They took me up to some holding cell in Montana."

Godina's home state is among 23 states and Washington, D.C., that allow marijuana use by people with various medical conditions. "I have glaucoma, so it's basically a medical thing," Godina said.

In April, he pleaded guilty and was fined $1,000.