Workers at a Queens bakery won a battle to keep their jobs after they say they were targeted because of their immigration status.

Employees at Tom Cat Bakery protested last week.

Thirty-one of them received letters warning they would be fired in 10 business days if they couldn't prove they're legally allowed to work in the U.S.

Many were blaming President Donald Trump's immigration crackdown. 

A worker at the bakery told NY1 through an interpreter that the employees were able to sit down with the head of the company and explain their plight.

"And you know, because of our fight, we were able, we won an extension. So now, we have until, to work until April 21, and we'll see from then on. But not only that, we were able, our collective power gained support from Tom Cat," the worker said.

The company produces artisan breads for upscale hotels and restaurants around the city.

The bakery said this was all part of an audit by the Department of Homeland Security, but it's unclear whether it's random or part of Trump's crackdown.