WASHINGTON — For months, President Trump has been railing about the urgent need for a wall to protect against what he calls “an invasion” of illegal immigrants flooding across the southwestern border. But he has also been delivering another message: “We need workers,” he told a group of activists recently.

In other words, he wants more immigrants.

“I want people to come into our country, in the largest numbers ever, but they have to come in legally,” Mr. Trump ad-libbed last month during his State of the Union address.

Comments like those from the president have ignited furious criticism from his hard-line, anti-immigrant supporters who accuse him of caving to demands for cheap foreign labor from corporations, establishment Republicans and big donors while abandoning his election promise to protect his working-class supporters from the effects of globalism.

“This is clearly a betrayal of what immigration hawks hoped the Trump administration would be for,” said Mark Krikorian, the executive director of the Center for Immigration Studies, which advocates cutting legal immigration by more than half. He warned that Mr. Trump was in danger of being “not even that different from a conventional Republican.”