"I have lived in this community for many years, and to suddenly have the police turn against me after being a victim in the accident really turned my life upside down," Gomez said in a press release. "I want to be able to trust the police."

Spokane is Washington's second-largest city with about 210,000 residents.

Gomez was eventually transferred by immigration officials to the Northwest Detention Center in Tacoma, where he remained until he posted bond. Gomez is seeking legal status to remain in this country, the ACLU said.

The lawsuit contended the officer unlawfully detained Gomez for purposes of investigating his immigration status and prolonged his detention to assist federal officers. The lawsuit also alleged that city policies unlawfully authorized officers to take such actions.

As part of the settlement, the city agreed to modify its policies to clarify that police officers "shall not contact, question, delay, detain or arrest an individual because s/he is suspected of violating immigration laws," the settlement said.