The agency says Franklin Michael Crane was sentenced to six days of time already served in jail.
He was also fined $5,000 and banned from owning weapons for 10 years.
The agency says Crane was trying to get into Canada at the border crossing in Coutts, Alta., on Friday when customs officers found a 9-mm handgun in his vehicle.
Crane was arrested and turned over to the border agency's criminal investigations section.
He was convicted under the Customs Act in Lethbridge provincial court on Wednesday.
Also on HuffPost