The San Francisco Police Department (SFPD) suspended its participation in the FBI’s Joint Terrorism Task Force (JTTF) last month. JTTFs are counterterrorism-focused intelligence-sharing centers, and by the FBI’s count, it operates 104 across the country. Many interpreted the SFPD’s suspension as a reaction to President Donald Trump’s “Muslim ban,” and to some degree it was. But it was also the culmination of a seven-year effort by community groups to hold the SFPD to the city’s legally codified standards of transparency and accountability. San Francisco’s success is a model for local resistance to Trump’s plans to mobilize the massive surveillance infrastructure he has inherited against targeted groups.

The effort began in 2010, when a group of almost 80 organizations formed The Coalition for a Safe San Francisco in response to concerns over improper surveillance and infiltration of Muslim communities by the SFPD and the FBI. Through a public records request, the Coalition uncovered a 2007 Memorandum of Understanding between the two law enforcement agencies that the SFPD Chief had signed without public knowledge or legislative review. It mandated that officers assigned to the task force operate under the same set of federal guidelines that govern the FBI. These federal guidelines are significantly looser than the city’s “reasonable suspicion” requirement, which specifies that police officers must have an articulable basis for suspecting criminal activity before they begin an investigation.

After uncovering the memorandum, the Coalition partnered with District Supervisor Jane Kim to draft the San Francisco Civil Rights Ordinance, a revised version of which was ultimately passed unanimously and signed into law.

The revision lays out three important provisions. First, it eliminates the possibility of secret agreements between the FBI and the SFPD by requiring proposed changes to the MOU be submitted for public comment at a Police Commission meeting. Second, it mandates that all local officers assigned to the task force comply with stronger state and local standards instead of weaker federal guidelines. And finally, it requires the police department to submit an annual report about its work with the FBI.

The Ordinance was criticized by some for having no “teeth.” But, as the Asian Law Caucus notes in a 2015 report: “like all laws, the Ordinance’s strength lies in its enforcement.”

The Coalition members who lobbied for the Ordinance ended up as its primary enforcers, pointing out Ordinance violations along with inconsistencies between the Department’s annual reports and its practices. According to the Asian Law Caucus, Ordinance enforcement has compelled the SFPD “to disclose more information about its collaboration with the FBI JTTF on an annual basis than any other local police department in the country.”

Shortly after Trump’s election, and with the mandated annual report on its JTTF activities due 11 days after his inauguration, civil rights groups increased their pressure on the SFPD to fully comply with the Ordinance. In response, the SFPD suspended its participation in the FBI JTTF.

In an article about the suspension in the Washington Post, an anonymous federal law enforcement official told reporter Ellen Nakashima that “[t]ask force officers do not generally seek to interview anyone without reasonable suspicion. ‘We don’t have the resources or bandwidth to waste our time’ going after people without at least some suspicion that they may have knowledge of potential terrorist activity.”

This source gives readers the impression that the FBI already uses the reasonable suspicion standard in its investigations, but its rules tell a different story. The FBI has three different types of investigations it can pursue: assessments, preliminary investigations, and full investigations. Assessments permit physical surveillance, interviews, racial and ethnic mapping, and the use of informants without any factual or criminal predicate. Agents can open assessments as long as they claim they have an “authorized purpose,” like preventing crime or terrorism, but need no evidence to suspect the subject is engaged in wrongdoing. Preliminary investigations only require “information or an allegation,” and a 2010 report by the Justice Department Inspector General found that, in practice, justifications are often speculative. Only full investigations, which allow electronic wiretaps and search warrants, require reasonable suspicion under the FBI guidelines.

Statistics on the FBI’s use of assessments also contradict the anonymous official’s statement to the Washington Post. The FBI provided data to the New York Times showing that it had opened over 82,325 assessments from 2009 to 2011, the first two years it had this authority. Only 3,315 of these assessments found information that warranted opening preliminary or full investigations. Despite the factual inaccuracy of his statement, this anonymous source makes an excellent point in his comment to the Post. Investigation without reasonable suspicion is not only a violation of civil rights, it is also a waste of law enforcement resources.

Both the SFPD’s 2012 Ordinance and, to a greater extent, its contract suspension, send an important message to the FBI: Local communities want to be safe from crime and terrorism, but they also want to be protected from unwarranted surveillance, infiltration, and profiling. Requiring law enforcement to have a reasonable suspicion of criminal activity before opening an investigation will curb abuse and funnel police resources toward suspects rather than law-abiding people. Local law enforcement must be forced to follow local law, and federal investigative guidelines must be raised so all Americans—including law enforcement—can feel secure.

San Francisco’s efforts are an example for cities across the country who want to hold federal, state, and local law enforcement agencies accountable. An ordinance modeled after San Francisco’s is moving through the Oakland City Council now, and Oakland’s police chief is in “strong support” of it. Use this map to see if your community has a JTTF, and if so, see if its police officers are allowed to disregard local law. If they are, demand that your local representatives pass an Ordinance like San Francisco’s, because forcing police to follow local law benefits communities and law enforcement.

Image: Justin Sullivan/Getty