A black Michigan man who was stopped by a sheriff's deputy after walking with his hands in his pockets said he believes he was the victim of racial discrimination.

The local sheriff says the deputy acted appropriately, and that the video of the incident doesn't show the full story.

Brandon McKean, 25, told The Huffington Post he was in the middle of walking a mile from a friend's house in Pontiac, Michigan to his own home to eat dinner around 4:30 p.m. on Thursday. The temperature had hovered around freezing that day, and he had his hands in his pockets.

McKean had been walking for just a few minutes, he said, when an Oakland County sheriff's deputy drove up, got out of the car and questioned him. McKean began filming with his phone.

"You were walking by … well you were making people nervous," the deputy says in the video McKean recorded, above. "They said you had your hands in your pockets."

"Wow, walking by having your hands in your pockets makes people nervous to call the police, when it's snowing outside?" McKean responds.

"They did," the deputy says. "I'm just checking on you."

McKean posted the video on Facebook, intending to show a few friends what he considered an absurd and unjustified stop by police. But it quickly went viral, with many outraged commenters sharing the post. By Tuesday, the video had been seen more than 3 million times, according to Facebook's stats, and had circulated widely, from Gawker to "The Colbert Report."

Oakland County Sheriff Michael Bouchard forcefully objected to the version of the incident that comes across when McKean's clip is viewed on its own, saying it doesn't clarify the reason for the stop and leaves out context. McKean's video cuts off before the end of their conversation, when the deputy further explains why he stopped McKean and the importance of following up on any 911 call.

The video "was posted with an agenda," Bouchard told HuffPost.

The sheriff said that before McKean was questioned, a business owner called 911, audibly frightened, about a man who had walked by the shop six or seven times looking in the windows with his hands in his pockets. The caller believed the man was casing the business and that a robbery could be imminent. The business and its employees had reportedly already been robbed seven times.

Bouchard would not name the deputies who were dispatched nor the business, but said they had determined the person the 911 caller described was McKean, "without question." After the furor over the video, the sheriff's office posted their own video, which the deputy had also recorded with a phone.

"It boils down to this, if someone calls 911, do you want the police to come or not?" Bouchard said. "A police officer responded, made a quick ascertainment of the situation and determined that nothing else was needed, didn't pat down an individual, never detained an individual, called off secondary units and left. I think that was a very restrained, very professional approach."

McKean told The Huffington Post that the suspicious person spotted by the business owner definitely wasn't him and that he had not walked the stretch that many times.

The encounter occurred at a time when racial bias in policing has become a national conversation in part because of the death of Mike Brown, a black 18-year-old who was killed by then-police officer Darren Wilson in Ferguson, Missouri this summer. A grand jury's decision not to indict Wilson was announced just a few days before McKean's brush with police, and McKean said Brown's death was just one of the many situations, including several others he experienced in the past, that prompt him to record encounters with law enforcement for his own safety.

Bouchard said controversial instances of policing around the country, like Ferguson, become teachable moments for his staff, and deputies' continual training includes cultural sensitivity. When his people do wrong, the sheriff said, he wants to hear from the community and hold officers accountable. But he argued McKean's stop is not one of those cases.

"Given the sensitivity and the anxiety for a lot of people around this country, it's not helpful to the dialogue and certainly not helpful to keep the community the safe," Bouchard said.

McKean was less positive about how police handled the incident in Pontiac, despite telling the deputy he was glad officers were around to patrol. He told The Huffington Post he'd been stopped "for absolutely no reason" three or four times in the last five years.