This story originally appeared on Telemundo Nueva Inglaterra. You can see it in Spanish here.

A man who was arrested Wednesday by federal agents in Lynn, Massachusetts, was released a day later, and he alleges he was assaulted when he was taken into custody.

Stream Los Angeles News for free, 24/7, wherever you are. WATCH HERE

Alejandro Reyes said he was taken into custody by U.S. Immigration and Customs Enforcement despite telling them on several occasions that he's a legal resident.

Reyes told Telemundo Nueva Inglaterra the agents took him to a cemetery — not a detention center — and beat him several times in a dark area. He showed wounds all over his body that he said he suffered in the ordeal.

Get top local stories in Southern California delivered to you every morning with NBC

See Full Page