An American man who had an AK-47 in his truck when he tried to cross into Canada has been acquitted of gun smuggling charges after a judge concluded it was an honest mistake.

William Lee York of Idaho was at the crossing between Blaine, Wash., and White Rock, B.C., with his wife in October 2008 when a Canadian border officer asked whether they had any guns in their vehicle.

York, a man in his mid-40s who was on his way to Vancouver Island to pick up some equipment from a scrap yard, told the officer there might be a round or two of ammo in the car, but no firearms.

When the officers searched the truck, they found an AK-47 underneath the back seat, and York was charged with a number of offences including smuggling goods into Canada and unauthorized possession of a firearm.

York legally owns several guns, including two pistols and the AK-47 -- a Soviet-designed assault rifle also known as a Kalashnikov -- and he is licensed to carry a concealed weapon in Idaho.

York and his wife testified they were aware they couldn't bring guns into Canada and emptied the truck before travelling to the border. York said he didn't realize the AK-47 was hidden away inside, suggesting a friend who had driven the vehicle earlier might have placed it there.

His wife and a border officer testified that York appeared genuinely shocked to see the AK-47, and the judge believed York didn't know it was there.

Instead, provincial court Judge Peder Gulbransen said it appeared to be a case of "human error."

"When you think of day-to-day life and you have something that is always somewhere -- a Canadian might have a flashlight in his car, or something that is visible, like a jack for the car, or jumper cables -- and you see them all the time," wrote Gulbransen in a decision posted to the court's website Friday.

"Now, this man is trying to, he says, rid his car of guns. He does not see his gun there. It is not where he always keeps it. I do not think it is unreasonable in this case for someone to believe, 'Well, I guess I already put it away.'"

Gulbransen noted York would be allowed to carry the AK-47 in his truck in Idaho, so the fact that he had the weapon in the vehicle isn't suspicious on its own. The judge also noted, without elaborating, that York has had trouble with some "Aryan Nations people who all have guns" in his home state, and noted Americans are permitted to own firearms for self-defence.

"There is a huge difference between attitudes towards firearms in Canada and the United States," wrote Gulbransen.

"The U.S. Supreme Court has declared fairly recently...that there is a constitutional right in the United States for citizens to bear arms for protection, for self-protection...Perhaps in Canada, we assume that a person carrying around a loaded gun or dangerous weapons are criminals, and we are usually right. In the United States, that is not the case. "