Maryland state police were wrong to arrest and charge a man for taping his own traffic stop and posting it on YouTube, a judge ruled earlier this week.

Motorcyclist Anthony Graber was charged with illegal wiretapping for recording plainclothes state trooper J.D. Uhler jumping from his unmarked sedan and drawing his gun -- and waiting a good five seconds before identifying himself as a police officer. The tape was shot with a conspicuous, helmet-mounted camera that captured the video and audio of the confrontation.

On Monday, a Maryland state judge stated in no uncertain terms that the felony charge never should have been filed.

“Those of us who are public officials and are entrusted with the power of the state are ultimately accountable to the public,” Circuit Court Judge Emory A. Plitt Jr. wrote. “When we exercise that power in a public forum, we should not expect our activity to be shielded from public scrutiny.”

The stop took place on the side of a busy highway in full view of the public.

“Under such circumstances, I cannot, by any stretch, conclude that the troopers had any reasonable expectation of privacy in their conversation with the defendant which society would be prepared to recognize as reasonable.”

In fairness to the trooper, the video shows Graber zig zagging in and out of traffic and, at one point, popping a wheelie at what appears to be close to 100 mph. The motorcyclist paid the ticket and thought that would be the end of it.

But after he posted the video on YouTube, police raided his home, hauled away his computers and the state's attorney charged him under a law that went onto the books before cell phones even existed.

Graber is one of an increasing number of US citizens who have been criminally charged for videotaping cops as they go about their official duties in public places. He was defended by the American Civil Liberties Union of Maryland. ®