FERGUSON, MO - AUGUST 13: Police watch over demonstrators protest the shooting death of teenager Michael Brown on August 13, 2014 in Ferguson, Missouri. Brown was shot and killed by a Ferguson police officer on Saturday. Ferguson, a St. Louis suburb, has experienced three days of violent protests since the killing. (Photo by Scott Olson/Getty Images)

Snapping photos of police in Ferguson, Missouri, may have gotten Huffington Post reporter Ryan J. Reilly arrested Wednesday night while he was covering protests prompted by the death of Michael Brown, an unarmed black teenager who was shot to death by a police officer.

Reilly and Washington Post reporter Wesley Lowrey were detained and assaulted after attempting to film a swarm of police officers inside a McDonald’s. An officer slammed Reilly's head into a glass window, and Lowery was shoved into a soda fountain while wearing press credentials around his neck. Both were later released without being charged with breaking any laws.

“They essentially acted as a military force,” said Reilly, who was in the restaurant to charge his phone and computer. “It was incredible.”

In recent years, there have been countless cases of police officers ordering people to turn off their cameras, confiscating phones, and, like Reilly, arresting those who attempt to capture footage of them. Despite a common misconception, it’s actually perfectly legal to film police officers on the job.

“There are First Amendment protections for people photographing and recording in public,” Mickey Osterreicher, an attorney with the National Press Photographers Association, told The Huffington Post. According to Osterreicher, as long as you don’t get in their way, it’s perfectly legal to take photos and videos of police officers everywhere in the United States.

Help us spread the truth by sharing the image below:

This misconception is pervasive enough that the New York City Police Department circulated a memo last week reminding officers.

“Members of the public are legally allowed to record police interactions,” the memo states, according to the Daily News. “Intentional interference such as blocking or obstructing cameras or ordering the person to cease constitutes censorship and also violates the First Amendment.”

The NYPD’s reminder comes as police activity is in the national spotlight. Just two days after Michael Brown’s death, cops in Los Angeles shot to death an unarmed black man who allegedly struggled with mental illness. And three weeks ago, a New York City police officer put Eric Garner in an illegal chokehold that left him dead after gasping “I can’t breathe!” A bystander caught the entire thing on video.

Those deaths, along with the arrests of Reilly and Lowrey, have raised questions about what, if anything, individuals can do to hold the police accountable for their actions. But one unquestionable right people have is to capture officers on film.

“There’s no law anywhere in the United States that prohibits people from recording the police on the street, in a park, or any other place where the public is generally allowed,” Osterreicher said.

A number of states do bar people from recording private conversations without consent. But as long as the recording is made "openly and not surreptitiously," said Osterreicher, it's fair game. According to Osterreicher, "assuming the position of holding up a camera or phone at arm’s length while looking at the viewing screen should be enough to put someone on notice that they are being photographed or recorded."

Several high profile court cases have taken up the issue, and in each case, the judge has either struck down the law or ruled that the police can't reasonably expect privacy while out in public. In March, for example, the Illinois Supreme Court declared the state's eavesdropping law unconstitutional, saying the law criminalized the recording of conversations that "that cannot be deemed private."

So why do so many police officers still act like filming them is a crime?

“Probably because they haven’t been trained otherwise,” said Osterreicher. “I think that there are many officers that believe that the minute they tell somebody to do or not do something, that that’s an order. But police can only order somebody to do or not do something based on the law, and there is no law that says you can not record or photograph out in public.”

Graphic by Jan Diehm for The Huffington Post.