Montgomery County announced Wednesday it has reached a settlement with photographer Mannie Garcia in a long-running First Amendment lawsuit in which Garcia claimed his civil rights were violated when county police officers detained him while he was recording what he believed to be excessive force applied during an arrest.

The county agreed to pay Garcia $45,000 to settle the case, which was filed in U.S. District Court in Greenbelt in 2012. However, the federal court still must consider how much the county should pay Garcia’s attorney’s fees and costs in the case, according to the settlement agreement.

“The parties believe it is in their best interests, and those of the citizens of Montgomery County, to bring finality to the case to achieve certainty as to its resolution,” a joint statement from Garcia and the county said.

Garcia, 63, is an award-winning photographer with more than 30 years of experience who is based in Washington, D.C. and is known for taking the photo of Barack Obama that artist Shepard Fairey later used to create the “Hope” poster that became an iconic image of the 2008 presidential campaign. Garcia filed the lawsuit after he was arrested in Wheaton on June 16, 2011.

On that day, according to the complaint, Garcia was leaving a restaurant with his wife and a friend when he saw county police officers arresting two young Hispanic men near the corner of Hickerson Drive and Georgia Avenue. Garcia stopped because he was concerned the officers were using too much force.

He began recording the ongoing arrest and when an officer approached him, Garcia identified himself as a member of the press. Despite having done so, according to the complaint, the officer tried to place Garcia under arrest and then placed him in a chokehold and reportedly dragged him across the street to a police cruiser. While he was standing next to the cruiser, an officer swept Garcia’s legs out from under him, causing the photographer to hit his head against the car before he was placed inside and taken to jail, according to the complaint.

Garcia was charged with disorderly conduct, but was later found not guilty in December 2011 by a Montgomery County District Court judge.

The settlement in the federal case eliminates the need for a trial, which was scheduled to take place this month.

The county had denied Garcia’s allegations in a response to the complaint. However, the county’s police department updated its policies after the Garcia incident to specifically note that the public has a right to record and photograph police officers.

“I think this case helps clarify the law,” Garcia’s attorney Robert Corn-Revere, said Wednesday. “It makes clear the First Amendment does protect both photojournalists and normal citizens when they document the actions of police in public places.”

He added, “Ultimately the county will pay our attorney fees, which underscores the lesson that violating First Amendment rights is not free.”

He said the court will determine the amount the county must pay, but he expects it to exceed six figures.

Garcia’s case also affected national policy. In 2013, the Department of Justice urged the federal court not to dismiss his case after Montgomery County filed a motion to do so.

At the time, the department wrote to the court, “The United States is concerned that discretionary charges, such as disorderly conduct, loitering, disturbing the peace and resisting arrest, are all too easily used to curtail expressive conduct or retaliate against individuals exercising their First Amendment rights … . Core First Amendment conduct, such as recording a police officer performing duties on a public street, cannot be the sole basis for such charges.”

Since Garcia’s case was filed, video recordings of police made by people using cell phones and other devices have become commonplace. Some videos showing what appears to be police officers using excessive force—in a few cases resulting in fatal shootings—have sparked a national conversation about police brutality and civil rights.

Garcia told the National Press Photographers Association about the settlement: “I’m extremely relieved that it’s come to fruition after five and a half years. I think this lawsuit has given attention to the fact that police departments need to pay attention in regards to individuals’ rights.”