A labor union representing 12,000 federal officers who issue immigration documents will join forces on Monday with the union representing deportation agents to publicly oppose a bill overhauling the immigration system that is making its way through the Senate, arguing that the legislation would weaken public safety.

The two unions represent a total of 20,000 employees in the Department of Homeland Security who would play a central role in carrying out the ambitious legislation, either by reviewing applications from millions of immigrants who could gain new legal status through the bill or by expelling illegal immigrants who did not qualify.

A letter to Congress that excoriates the Senate proposal, and that the immigration officers’ union signed for the first time, reveals simmering unrest among Homeland Security employees, who have been asked to carry out broad and fast-paced immigration policy shifts by the Obama administration. Deportation agents have been instructed to focus heavily on removing serious criminal offenders, while immigration officers have been urged to accelerate their decisions on granting legal papers and reprieves from deportation.

The criticism of the bill from inside the system gives new political fuel to its most staunch opponents — among them Senator Jeff Sessions, Republican of Alabama — when they had been battling on the defensive.