Democratic presidential candidate Julian Castro danced around a question Thursday night about potential incarceration for illegal immigrants during a Fox News town hall.

Responding to a woman who claimed to have had her social security number stolen by an illegal immigrant, Castro would not commit to incarcerating illegal immigrants who come to the U.S. and commit crimes. (RELATED: New York Moves Closer To Giving Driver’s Licenses To Illegal Immigrants)

“Would you be willing to penalize offenders taking advantage of Americans by having them not released if they are known to be illegal?” the woman asked.

“People commit crimes,” Castro said. “Crime happens.”

Castro acknowledged that said crime should be “punished,” but did not answer her question on incarceration as a potential punishment for illegal immigrants.

“If somebody commits that kind of crime, then of course I believe that that person should be punished,” Castro said. “What I don’t believe is that we should be incarcerating these women and children who are fleeing desperate circumstances in those countries and simply are looking for a better life.”

WATCH:

Castro has been a staunch opponent of President Donald Trump’s immigration proposals, and he released an immigration plan earlier this year, in which he declared that illegal immigration is not a national security threat, and said that the U.S. should end criminal penalties for illegal immigration. (RELATED: Former Obama Cabinet Member Julian Castro Announces 2020 Presidential Bid)

“The truth is, immigrants seeking refuge in our country aren’t a threat to national security,” Castro wrote, according to the Houston Chronicle. “Migration shouldn’t be a criminal justice issue. It’s time to end this draconian policy and return to treating immigration as a civil — not a criminal — issue.”

The 44-year-old Castro served as mayor of San Antonio from 2009-2014 and as President Barack Obama’s Housing and Urban Development secretary from 2014-2017.

Castro is considered a long-shot to win the Democratic presidential nomination, but he did qualify for the first primary debate, which will take place in Miami, Florida later this month.