A 20-year-old San Antonio mariachi singer whose detention by U.S. Immigration and Customs Enforcement drew national attention has been released after spending two weeks in federal custody.

Herbert Ibarra Castro was released Saturday after an immigration judge granted him a $15,000 bond during a hearing earlier in the week. His release comes after he was detained June 25 following a traffic stop by police in China Grove, one day after his attorney says he submitted paperwork to apply for lawful permanent resident status, commonly known as a green card.

“I feel really blessed, very grateful,” Ibarra Castro said after his release. “More than anything, I just feel very happy to be able to be free.”

Ibarra Castro, who moved to the United States from Mexico when he was 4 years old, is a graduate of Fox Tech High School and is married to a U.S. citizen.

He said he was frightened when he was taken into custody.

“I was just very nervous, very scared,” Ibarra Castro said. “My wife was at school at the time, and I felt very, very anxious.”

His attorney Lance Curtright said Ibarra Castro’s immigration case remains pending despite his release.

“The next steps would be to try to have a hearing over Marisol Pantoja’s, his wife’s, application to keep him here,” Curtright said. “Hopefully that will happen in the next few months, and when that occurs, and presuming everything goes well, which I think it will, he will receive his lawful permanent residence.”

An immigration judge will ultimately determine whether Ibarra Castro will be allowed to remain in the United States.

His wife, Marisol Pantoja, described the emotional toll the detention took on their family.

“Everyone would tell me I couldn’t be the one crying because he’s in there,” Pantoja said. “I needed to be strong for him. Usually it’s the other way around. He’s the strong one, and I get to fall apart in his arms. But in this case, it had to be the other way. It’s definitely been a learning moment and an eye-opening experience.”

After his release, the couple reunited in an emotional embrace captured on video shared by Pantoja.

Ibarra Castro said thoughts of his wife helped him endure his time in detention.

“Whenever I was in there, all I could do was think about her, and it would make me cry,” he said. “But she would tell me to keep my head up, to keep pushing, keep being strong, and that’s what I did. I prayed to God, and he answered my prayers.”

Ibarra Castro also thanked the San Antonio community for the support he received during his detention, saying the encouragement from friends, supporters and strangers gave him hope as he awaited his release.