The partial government shutdown over U.S. President Donald Trump's demand for a border wall is playing havoc with the nation's already backlogged immigration courts, forcing the postponement of hearings for thousands of immigrants.

For some of those seeking asylum in the U.S., the impasse could mean years more of waiting -- and prolonged separation from loved ones overseas -- until they get a new court date.

But for those immigrants with little chance of winning their bids to stay in this country legally, the shutdown could help them stave off deportation that much longer -- adding to the very delays the Trump administration has railed against.

"It is just dripping with irony," said Sarah Pierce, policy analyst at the nonpartisan Migration Policy Institute. "This administration has put a lot of emphasis on speeding up court cases, and the shutdown obviously is just going to cause massive delays."

The shutdown has furloughed hundreds of thousands of government employees and halted services that aren't deemed essential, including, in many instances, the immigration courts overseen by the Justice Department.

Hearings involved detained immigrants are still going forward. But untold thousands of other proceedings have been postponed. No one knows for how long; it depends on when employees return to work and hearings can be reset.

Immigration experts said cases could be delayed months or years since the courts have more than 800,000 pending cases, according to the Transactional Records Access Clearinghouse at Syracuse University, and many courtrooms are tightly booked.

Immigration Judge Dana Marks, former president of the National Association of Immigration Judges, said she has at least 60 hearings a day in her San Francisco courtroom and no space on her docket for at least the next three years.

"The cases that are not being heard now -- there is no readily available place to reschedule them until at least 2022 or beyond," Marks said of her courtroom.

Immigration judges hear a wide range of complex cases from immigrants from across the world, some who have recently arrived in the United States, others who have lived in the country for years and the government is seeking to deport.

Immigration judges have long sought more staffing to handle the ballooning caseload, which has roughly doubled in five years following a surge in Central American children and families arriving at the southern border. The Trump administration has tried to speed up the courts by assigning immigration judges quotas and stopping them from shelving cases.

Some of the toughest cases immigration judges hear are claims for asylum, or protection from persecution. And long wait times can be especially difficult for asylum seekers, since they can't bring spouses or children to join them in the United States unless their asylum requests are approved.

Reynold Finnegan, an immigration attorney in Los Angeles, said one of his Afghan clients hasn't seen his wife or children in nearly nine years. After being kidnapped and tortured by the Taliban, the man left his homeland, travelled across the world and made his way to the U.S.-Mexico border to seek asylum, Finnegan said.

He waited more than six years for his final hearing before an immigration judge, but it was cancelled last week because of the shutdown, and he doesn't know how much longer it will take.

"He is devastated," Finnegan said. "He was really planning on seeing his wife later in the year when he got approved, and his children."

Since the shutdown began in December, immigrants have had to prepare for their scheduled court hearings and in many cases travel to court, knowing the proceedings might be postponed. In Northern states, that can mean hourslong car trips through ice and snow and taking days off from work.

The delays are painful for many immigrants, especially those who have strong asylum claims or green card applications and want to get their lives on solid footing in the United States.

Those with the weakest asylum claims actually benefit from the delays, because they are able to remain in the U.S. in the meantime and hold out hope of qualifying for legal status by some other means down the road.

In the 2017 fiscal year, immigration courts decided more than 52,000 asylum cases. About 1 in 5 were approved, according to statistics from the courts.

This isn't the first time immigration courts have been crippled by a government shutdown. More than 37,000 immigration hearings were delayed by one in 2013.

And it isn't just immigration courts that are affected. Since Justice Department attorneys are allowed to work in limited circumstances only, some high-profile civil cases have been put on hold, including a lawsuit in Oregon by the widow of Robert "LaVoy" Finicum, a man shot by police in 2016 after the takeover of a wildlife refuge.

Government attorneys have also sought to put on hold environmental cases, including challenges to logging projects and wild horse roundups in Montana and a lawsuit over the disposal in Oklahoma of toxic coal ash from power plants.

Most major criminal cases are expected to stay on track because of federal requirements for a speedy trial.

One aspect of immigration unaffected by the shutdown is the review of applications for green cards and citizenship. That's because those tasks, which are handled by an agency in the Homeland Security Department, are paid for by application filing fees.

One asylum seeker, who spoke on condition of anonymity for fear of persecution in her home country, said the wait has been unbearable since her 2014 court date was twice delayed. It is now set for February.

"The past four years have been horrible enough, but this uncertainty, and my life being handled with such, I don't know, no one cares, basically," she said. "The process takes forever -- just to get the date in front of the judge."

------

Associated Press writers Dave Kolpack in Fargo, North Dakota; Amy Forliti in Minneapolis; and Matthew Brown in Billings, Montana contributed to this report.