The discovery of a headless body floating near the Texas spring break haven of South Padre Island touched off an investigation that prosecutors say revealed a U.S. Border Patrol agent had helped a Mexican cartel to move illegal weapons and ammunition south of the border and illicit drugs to the north.

The prosecutor alleges that agent Joel Luna got pulled into the business to help his brothers, including one linked to a cartel, and that their operation unraveled when investigators found a “treasure trove” of evidence in a safe at Luna’s mother-in-law’s home. The material included passwords to Luna’s work computer, almost $90,000 in cash and a kilo of cocaine. The trail of evidence led to Luna being accused on a raft of charges, including capital murder in the death of a man seen as a possible snitch.