An undocumented worker who was arrested by Immigration and Customs Enforcement while giving a deposition against his former employer in upstate New York has been released from detention, and has filed new complaints over the government arrest. The case has alarmed immigrant and labor advocates, because ICE has a memorandum of understanding with the U.S. Department of Labor not to detain workers in the process of suing an employer over workplace violations.

Xue Hui Zhang, 45, is a Chinese national and lives in Brooklyn. He is suing the now defunct Ichiban restaurant in Guilderland, near Albany, for allegedly owing him $200,000 in back wages. He worked there from 2008 to 2015. (There is another Ichiban in the area with different ownership.)

Listen to Beth Fertig’s report on WNYC:

On August 12th, Zhang was giving a deposition in the office of his former employer’s attorney. He stepped out for lunch with one of his own attorneys and was arrested by ICE as soon as they parked at a local diner.

Zhang was eventually transferred to a detention center near Buffalo and was released on September 6th without bond. When asked why, an ICE spokesman would only say the agency makes decisions on a case by case basis after looking at the circumstances.

One of Zhang’s attorneys, John Troy, who’s based in Flushing, said he’s now filed a complaint with the National Labor Relations Board for arresting Zhang while his labor case was proceeding. He accuses ICE of violating the National Labor Relations Act by acting on a tip from the restaurant’s former owner about Zhang’s whereabouts.

“You are pursuing employee’s rights, you are protected by anti-retaliation law,” said Troy.

Experts say it’s extremely rare for ICE to arrest someone in the middle of a labor dispute. Deborah Berkowitz was chief of staff at the Occupational Safety and Health Administration during the Obama administration and is now at the National Employment Law Project. She said she believes these arrests are happening more frequently now, citing one in Massachusetts involving an injured man with a worker’s compensation claim.

Berkowitz said these arrests send a message to a much wider community.

“Word travels, and it travels not just among undocumented workers,” she explained. “It travels among all workers as a sign that if you confront your employer with a worker issue, then bad things can happen to you or your co-workers and you better keep your head down.”

Elizabeth Jordan, a supervising attorney with the workplace justice legal team of Make the Road New York, said she’s glad Zhang was released by ICE. But she also worries about the damage that’s been done.

Wage theft is “particularly egregious among low wage immigrant workers,” she said. “We see it in the restaurant industry and the construction industry and among domestic workers, health care aides, home aides.”

Although Zhang has been released from detention, his attorney is now asking a federal judge in the Northern District of New York to halt the order of supervision that requires Zhang to check-in with ICE. He’s also seeking a temporary restraining order to prevent Zhang from being deported while he continues to pursue his labor case.

Zhang arrived in the U.S. in 2001 and has a deportation order dating back to 2002. He lost several attempts to win asylum since then on the grounds of his political opinion. After his arrest in August, ICE denied violating the agreement not to interfere in labor cases by citing Zhang’s long standing order of deportation.

Zhang accuses his former employer of tipping off ICE last month. But Matthew Mann, an attorney for the restaurant owner, said his client assured him that didn’t happen. However, he did not respond to new questions about whether he could have contacted other parties. In court papers, the government said ICE was tipped off by a local sheriff’s deputy about Zhang’s whereabouts on August 12th.

The government also argued that the Fair Labor Standards Act only allows an employee to sue an employer for retaliation, not the government. It said “ICE had no knowledge of Zhang being involved in any federal litigation” over his back wages.

In responding to Zhang’s request for a judge to block the government from removing him during the labor case, the government said that even if he was deported “he would be able to continue communicating with his attorneys with his employment rights case via telephone.”

Zhang’s attorney has argued that would make it much too difficult for him to present evidence. He said his client is also pursuing a U visa for immigrants who are victims of crime, and that his application was already certified. If approved, he would eventually get a green card.

Beth Fertig is a senior reporter covering courts and legal affairs at WNYC. You can follow her on Twitter at @bethfertig.