BANGOR, Maine — A Mexican man who took a wrong turn when he left Pennsylvania and wound up in Houlton with a bag full of counterfeit $100 bills was sentenced Monday in U.S. District Court to a year and a day in federal prison.

Silvestre Rivera Hernandez, 50, was arrested in February with his son and two nephews at the Houlton border crossing after they had been turned back by Canadian officials who believed they had entered that country by mistake.

Hernandez faced up to 20 years in prison and a fine of up to $250,000 for possession of counterfeit U.S. currency.

His companions, Noe Peralta Rivera, 23, Valentine Peralta Rivera, 26, and Gabriel Rivera Peralta, 25, were charged with possession of false immigration documents. They were sentenced in May to time served, or 68 days in jail, then turned over to immigration authorities for deportation.

The men arrived in two cars at the Houlton border crossing about 8 p.m. Sunday, Feb. 24, according to court documents. During interviews with U.S. Customs and Border Protection officers, they told agents that they had been living and working in Pennsylvania.

The next day, while the Mexicans were being held for removal by immigration officials, a custodian reported finding a bag of money in the trash barrel of the men’s restroom at the Houlton border crossing, according to court documents. Agents found 201 $100 bills, many of which had the same serial numbers, in a plastic bag in the trash.

A review of the security tapes at the Houlton border crossing inspection area showed Hernandez removing something from a blue bag, placing an object under his left arm or in the left side of his jacket, covering it with a piece of clothing, then walking in the direction of the men’s room.

Deputies at the Aroostook County Jail found three of the bills in a search of Hernandez’s personal property, according to court documents.

Hernandez admitted that he had paid $250 to a man in Pennsylvania for 180 of the fake $100 bills. He also told investigators that he hid the money in a trashcan in the restroom.

He said that he had not passed any of the fake currency but had intended to take it to Mexico and either exchange or spend it there, according to court documents.

Prosecutors did not charge Hernandez with having false documents.

He is expected to be deported after completing his sentence.