KEARNY, N.J. — A Pennsylvania man who was arrested for trying to drive into New York City with a cache of weapons has been released on bond.

John Cramsey, of Zionsville, was freed early Thursday from the Hudson County Correctional Facility.

Cramsey and two co-defendants were detained in June as they prepared to enter the Holland Tunnel in a truck carrying a military-style rifle, a shotgun and five handguns. Their attorneys have said the police search was illegal. All three have pleaded not guilty to weapons charges.

Cramsey, whose daughter died of a heroin overdose in February, posted online shortly before the arrest that he was heading to New York to “rescue” a 16-year-old girl whose friend had overdosed.

His co-defendants are still in jail.