A man accused of bringing roughly a pound of marijuana over the Colorado border into Wyoming pleaded guilty Tuesday to one of two felony charges brought against him in Albany County District Court.

Miguel Hernandez, 22, entered a guilty plea on one count of possession of a controlled substance. In exchange for his guilty plea, the state agreed to drop a second charge -- possession of a controlled substance with intent to deliver --  and recommend Hernandez be sentenced to a term of probation.

Hernandez was arrested Feb. 3 after a Wyoming Highway Patrol trooper stopped him for speeding near mile post 414 on US 287 northbound.

Court documents say the trooper smelled marijuana as he was preparing to give Hernandez a ticket and send him on his way. A search of the vehicle turned up nearly 17 ounces of marijuana in 13 different plastic bags as well as 20 reportedly drug-related items and $1,408 in cash, with bills ranging in denomination from $100 to $1.

"Now, you had a lot of interesting things in your car, didn't you?" Judge Jeffrey Donnell asked in court Tuesday. "[The marijuana] was broken down for sale, wasn't it?"

"I was just delivering it, but in the end I would end up getting profit," Hernandez replied.

When Donnell asked where Hernandez got the marijuana, Hernandez said he was close to being laid off at the time and was hoping to make ends meet until he found new employment.

Hernandez described becoming acquainted with a man he said lived under a bridge and said he paid the man $850 for the marijuana he was caught with.

"Hmm. Quite a story, Mr. Hernandez," Donnell said before addressing Hernandez's $10,000 signature bond.

"Why don't you tell me why, given the fact that you were engaged in the drug dealing business, you should walk out of here on a signature bond?" Donnell asked.

Hernandez said he needed to remain free to care for his family, but eventually told Donnell that he should be locked up.

"I deserve it in all honesty," Hernandez said. Donnell agreed and ordered Hernandez remanded to custody.

Hernandez was stunned.

"Really?" he asked before pleading with Donnell. "Please sir, no."

"He's remanded," Donnell said. "Lock him up."