WASHINGTON — While railing against California for its so-called sanctuary immigration policies, President Donald Trump referred to some people who cross the border illegally as "animals" — drawing a sharp rebuke from Democratic leaders for the harsh rhetoric.

Trump's remark at meeting with local leaders was in response to a complaint about gang members.

"We have people coming into the country, or trying to come in — and we're stopping a lot of them," Trump said during the immigration round table after a sheriff commented about gangs. "You wouldn't believe how bad these people are. These aren't people. These are animals."

Senate Minority Leader Chuck Schumer, D-N.Y., responded on Twitter to the president, saying, "When all of our great-great-grandparents came to America they weren't 'animals,' and these people aren't either."

Trump was joined at the Wednesday White House meeting by mayors, sheriffs and other local leaders from California who oppose the state's immigration policies and who applauded his administration's hard-line efforts.

"This is your Republican resistance right here against what they're doing in California," said Assemblywoman Melissa Melendez, coopting a term used by Democrats opposed to Trump's presidency. She, like others, said the president and his policies were far more popular in the state than people realize.

They were criticizing legislation Gov. Jerry Brown signed into law last year that bars police from asking people about their immigration status or helping federal agents with immigration enforcement. Jail officials can transfer inmates to federal immigration authorities if they have been convicted of one of about 800 crimes, mostly felonies, but not for minor offenses.

Brown insists the legislation, which took effect Jan. 1, doesn't prevent federal immigration officials from doing their jobs. But the Trump administration has sued to reverse it, calling the policies unconstitutional and dangerous. Some counties, including San Diego and Orange, have voted to support the lawsuit or have passed their own anti-sanctuary resolutions.

Republicans see backlash to the law as a potentially galvanizing issue during the midterm elections, especially with Trump's anti-immigrant base. And Trump has held numerous events in recent months during which he's drawn attention to California's policies.

During the session, Trump thanked the officials, saying they had "bravely resisted California's deadly and unconstitutional sanctuary state laws." He claimed those laws are forcing "the release of illegal immigrant criminals, drug dealers, gang members and violent predators into your communities" and providing "safe harbor to some of the most vicious and violent offenders on earth."

Brown responded on Twitter, writing that Trump "is lying on immigration, lying about crime and lying about the laws of CA."

The Democratic governor added: "Flying in a dozen Republican politicians to flatter him and praise his reckless policies changes nothing. We, the citizens of the fifth largest economy in the world, are not impressed."

The discussion comes as the Trump administration is under fire for a new policy that is expected to increase the number of children separated from their parents when families cross the border illegally.

Trump, in his remarks, wrongly blamed Democrats for forcing his administration's hand.

"I know what you're going through right now with families is very tough," he told Homeland Security Secretary Kirstjen Nielsen, "but those are the bad laws that the Democrats gave us. We have to break up families ... because of the Democrats. It's terrible."

But no law "the Democrats gave us" mandates the separation of children from their parents at the border. The administration is using protocols described in a 2008 law designed to combat child trafficking that gave special protections to Central American children at the border. While the bill was authored by Democratic Sen. Dianne Feinstein, it unanimously passed both houses of Congress and was signed by Republican President George W. Bush as one of his last acts in office.

Nielsen on Tuesday defended the practice, telling a Senate committee that removing children from parents facing criminal charges happens "in the United States every day."

The event also came as top House Republicans worked to head off an attempt by party moderates to force roll calls on four immigration bills. Republican leaders privately warned GOP lawmakers Wednesday that such a drive could damage the party's prospects in the fall's congressional elections by dispiriting conservative voters, according to people at the closed-door meeting.

The House leaders fear the winning legislation would be a compromise bill backed solidly by Democrats but opposed by most Republicans, an outcome that could anger conservatives, according to Rep. Jeff Denham, R-Calif., a leader of the effort to force the immigration votes.

House Majority Leader Kevin McCarthy, R-Calif., issued the warning, said a second person who was in the room and spoke on condition of anonymity to describe the private conversation.

Asked about his remarks, McCarthy said his objection to the procedure was that it would in effect "turn the floor over" to Democrats.

House Speaker Paul Ryan said the petition would be "a big mistake" that would "disunify our majority." He said the leaders were "working with the administration."

The moderates said later Wednesday that House leaders were trying to end the immigration standoff and that they could soon see a specific proposal on how to do that.

"We're willing to see what this looks like," said Rep. Carlos Curbelo, R-Fla., a leader of the lawmakers trying to force the House to address the issue. Conservatives had their own session with party leaders and also suggested there had been movement, but offered no specifics.

Many of the legislators demanding action face potentially competitive re-election races in congressional districts with large numbers of Hispanic, suburban or agriculture-industry voters with pro-immigration views.

Earlier this year, competing bills aimed at protecting young immigrants and toughening border security — including one backed by Trump — collapsed in the Senate. The measures never received House votes.