But for those with ICE badges, perhaps the biggest change was the erasing of the Obama administration’s hierarchy of priorities, which forced agents to concentrate on deporting gang members and other violent and serious criminals, and mostly leave everyone else alone.

A whirlwind of activity has overtaken ICE headquarters in Washington in recent weeks, with employees attending back-to-back meetings about how to quickly carry out President Trump’s plans. “Some people are like: ‘This is great. Let’s give them all the tools they need,’” said a senior staff member at headquarters, who joined the department under the administration of George W. Bush.

But, the official added, “other people are a little bit more hesitant and fearful about how quickly things are moving.”

Two officials in Washington said that the shift — and the new enthusiasm that has come with it — seems to have encouraged pro-Trump political comments and banter that struck the officials as brazen or gung-ho, like remarks about their jobs becoming “fun.” Those who take less of a hard line on unauthorized immigrants feel silenced, the officials said.

ICE has more than 20,000 employees, spread across 400 offices in the United States and 46 foreign countries, and the Trump administration has called for the hiring of 10,000 more. ICE officers see themselves as protecting the country and enforcing its laws, but also, several agents said, defending the legal immigration system, with its yearslong waits to enter the country, from people who skip the line.

John F. Kelly, the secretary of the Department of Homeland Security, said in a statement after the first large-scale roundups of the Trump administration: “President Trump has been clear in affirming the critical mission of D.H.S. in protecting the nation.”