The American Civil Liberties Union of Alaska is suing the city of Palmer and members of its police force, alleging officers wrongfully detained a Peruvian man over his immigration status.

The lawsuit, filed on behalf of Alex Caceda, says officers lacked authority to arrest him last summer.

According to the lawsuit, which seeks unspecified damages, Caceda was helping provide security at a bar in Palmer when a fight erupted. He tried to help a female bartender who was being attacked and was hit and left bloodied.

The lawsuit says a responding officer asked Caceda if he was from Alaska before asking a dispatcher to contact federal immigration officials.

“It is unconscionable that the Palmer Police treated the victim of a violent assault this way,” said ACLU of Alaska Executive Director Joshua A. Decker. “Law enforcement leaders and their rank and file officers all over Alaska need to be put on notice that if they arrest anyone just for being undocumented, and particularly crime victims, they’ll be held accountable.”

The lawsuit says Caceda is married to a U.S. citizen but lacked legal immigration status and was held four nights before being released.

Copyright 2018 KTVA. All rights reserved. The Associated Press contributed to this report.