Donald Trump. AP Photo/Charles Krupa Donald Trump held a town-hall-style event on Thursday, and his first question was from a woman who appeared to criticize his hard-line approach to illegal immigration.

The woman began by saying she was from Southern California.

"You live in Southern California? What are you doing here? Are you a liberal Democrat, by any chance?" Trump joked at the Exeter, New Hampshire, event.

She continued by saying she had friends who immigrated to the US illegally.

"I know the role that they have in the California and national economy because they do work that no one else wants to do and for a lot less," she told Trump.

Trump responded by accusing her of asking the question on behalf of Sen. Bernie Sanders (I-Vermont), a left-wing Democratic candidate.

"Who told you to be here? Bernie?" he asked her. "No, no, this is a Bernie plant. This is a Bernie plant. All right, OK, I understand your question."

A second woman, Lucy Weiler, then yelled at Trump that immigrants were part of the backbone of the US.

"I don't think so, darling," Trump shot back. "I don't think so. I don't think so. No, I don't think so. They're not the backbone."

Trump continued:

Let me just tell you something, you know what the backbone of our country [is]? People that came here and they came here legally. People that came to this country legally. And they worked their a-- off and they made the country great. That's the backbone.

Watch part of Trump's response below: