Washington (CNN) President Donald Trump said on Tuesday he supports a government shutdown if Democrats won't agree to tighten immigration laws, undercutting ongoing bipartisan negotiations on Capitol Hill.

The comment, which came during a White House meeting on the violent MS-13 gang, was not well received in the room. Rep. Barbara Comstock, a Virginia Republican who represents a district with thousands of federal workers, confronted Trump about the remark and urged him to avoid another government shutdown.

"If we don't change it, let's have a shutdown," Trump said of the nation's immigration laws. "We'll do a shutdown and it's worth it for our country. I'd love to see a shutdown if we don't get this stuff taken care of."

He added: "If we have to shut it down because the Democrats don't want safety, and unrelated but still related, they don't want to take care of our military, then shut it down. We'll go with another shutdown."

The government will run out of funding Thursday if negotiators can't strike a deal.

Read More