An attorney who is the star prosecution witness in the federal bribery trial against Thirteenth Court of Appeals Justice Rudy Delgado nearly didn’t make it to the stand on time to testify on Wednesday.

It was a close call because Edinburg attorney Noe Perez Jr. was detained up until 15 minutes before his scheduled testimony after the U.S. Marshals Service arrested him Tuesday for allegedly violating the terms of his $25,000 unsecured bond in his separate criminal case related to the judicial bribery scheme.