An illegal alien detained by Department of Immigration and Customs Enforcement (ICE) agents in California was let go on Thursday after activists raised $80,000 for his defense.

Mexican national Hugo Aguilar spent 17 months in detention but was released from the West County Detention Facility on August 30 in Richmond, California, after activists for illegals raised the money for his bond, according to ABC 7.

Aguilar was detained last year after being arrested on other charges.

The fortunate illegal was not the only alien released by the Contra Costa County Sheriff’s Department. A large number of illegals have since been transferred elsewhere after the department canceled its contract with the Department of Immigration and Customs Enforcement.

Aguilar’s release comes on the tail of a controversial decision by the sheriff’s office to end to its relationship with ICE.

“Today I am announcing we are ending the contract with ICE,” Sheriff David Livingston announced on July 10. “I recently notified ICE of this decision and asked them to begin the process of removing their detainees in a safe and orderly manner.”

The decision deprived ICE of housing for under 200 detainees, but also will deprive the county of up to $3 million a year in government contracts.

Follow Warner Todd Huston on Twitter @warnerthuston.