He had been told by Homeland Security to buy a plane ticket to Mexico.

The man was in the United States illegally, but his immigration attorney, Adam Crayk, said he had planned to file a motion to reopen the case and delay his deportation so they could argue before a judge that he should be able to stay.

His wife is a U.S. citizen, Crayk said, and he had come back to the United States years ago after she fell on hard times. His attorneys were planning to challenge some of the documentation that led to the latest deportation order.

But there was no one there to file the case. No judge to decide whether it should be reopened — or if the man should be able to stay in the country while his case is pending.

Instead, the man was arrested by Immigration and Customs Enforcement earlier this month and sent back to Mexico.

This is one of the outcomes of the longest government shutdown in history, where immigration courts were shuttered but ICE agents still on the job. And even as the shutdown reached its end Friday, the 35-day shuttering of immigration courts is expected to have implications on cases for months to come.

Hundreds of immigration cases in Utah were canceled after the shutdown began in late December, according to data from the Transaction Records Access Clearinghouse (TRAC). The nonprofit research center based at Syracuse University estimated that more than 40,000 immigration cases have been canceled as of Jan. 11. And as the shutdown stretched on, it estimates that another 20,000 hearings are canceled every week.

TRAC estimated that if the shutdown had made it to the end of January, more than 86,000 hearings would be canceled nationwide.

Utah was not the hardest-hit state — places like California, New York and Texas have had tens of thousands of cases delayed. Utah had a few hundred cancellations, and it would have been nearly 600 by Feb. 1.

Crayk said his law office had deportation trials scheduled for clients almost every day this month, sometimes two in one day.

“On some of them, we had really valid, viable and amazing cases,” Crayk said. “This was going to be their date to finally get their day in court as to why their deportation should be canceled. It really affects those guys. They have really good, viable cases.”

Crayk said earlier this week that immigration attorneys continued to file motions this month so they don’t miss the deadlines that have been already set — but the filings were stacking up and sitting idle because the judges aren’t allowed to look at the paperwork.

Another Salt Lake City-based immigration attorney, Jennifer Ha, said her office has had only one case canceled. But for her clients who are being held in Aurora, Colo. — the nearest immigration detention center to Utah — it’s been slow getting hearings to argue for their release. Hearings for immigrants who are in custody still went forward during the shutdown.

“It’s very stressful for them,” she said. “It’s very stressful for their families. They don’t know when that person will be released from detention.”

One of Ha’s clients has been seeking asylum since 2016, and his hearings have been rescheduled multiple times because of the already-existing backlog. Because of the government shutdown, Ha worries his July 2019 hearing will also be canceled or delayed.

“Now with a month shutdown, immigration courts are just so jammed,” she said. “A one-month delay, it’s a huge amount of cases that they are not able to see.”

Crayk worries it could take months, if not years, for the courts to recover from the lengthy shutdown. And when the immigration judges do go back to work, he said, they’ll face a crushing number of cases to make room for on a schedule that was already bloated.

The government shutdown revolves around immigration policies, primarily a push from President Donald Trump to fund a wall on the border of the United States and Mexico to keep out illegal immigrants. He agreed to a three-week funding bill that included no border wall money, and if Trump and congressional leaders can’t reach some agreement by then, big parts of the government, including these immigration courts, will shut down again.