Thousands of Dreamers thought they had met the final deadline to renew their DACA status last month. But some of those applications got stuck in the mail.

The Trump administration plans to end the program formally known as Deferred Action for Childhood Arrivals, which protects nearly 700,000 young immigrants in the country illegally from deportation, starting next year.

The administration now says it will reconsider some applications that incorrectly were rejected, even though they were mailed before the deadline.

According to U.S. Citizenship and Immigration Services — the agency that processes DACA renewals — at least 4,000 applications were rejected for barely missing the deadline, out of more than 130,000 renewal applications.

It's not clear how many of those applications were rejected incorrectly. Immigrant rights advocates say they've encountered dozens of cases, but the real number could be in the thousands.

Varlene Cooper, a DACA recipient who came to the U.S. from Grenada 20 years ago, lives in Brooklyn with her two kids, who are U.S. citizens. Cooper says she mailed her DACA renewal and the application fee more than a week before the deadline of October 5. And then she held her breath.

"To DACA recipients, it's our lives — this is our entire lives, hanging in the balance," she said.

Cooper's application — and an unknown number of others — were sitting in a post office box on October 5. Federal bureaucrats didn't pick them up until the next day. The U.S. Postal Service failed to deliver another batch of applications until days after the deadline. All were rejected for being late.

At first, USCIS said the people whose applications were rejected were essentially out of luck. But in a memo issued late Wednesday night, the agency changed course.

USCIS now says it will reconsider renewal applications that were rejected— provided the applicant can show "individualized proof" that the application arrived late as "the result of USPS mail service error."

In cases where the rejected application arrived at the post office box on time, USCIS says it will "proactively reach out" to the applicants to let them resubmit.

The memo from the agency came just hours before a court hearing in Brooklyn, in a case where a coalition of immigration and civil rights lawyers are challenging the Trump administration's plan to end DACA. Lawyers in that case say the reported problems with rejected applications were predictable.

"The simplest way that this could've been avoided would've been for the government to apply the rule that it applies in many other circumstances, which is called the mailbox rule, which goes by the date of the postmark," said Joshua Rosenthal, a staff attorney at the National Immigration Law Center. Instead, the Trump administration required that all renewal applications be received by the October 5 deadline.

Lawyers representing DACA applicants say deadline snafus weren't the only problem. They say there were clerical mistakes, too — including one application that was rejected because a bureaucrat thought the applicant wrote 2012 on her check instead of 2017.

At Thursday's hearing, Judge Nicholas Garaufis urged lawyers for the government and the DACA applicants to resolve problems with rejected applications on their own. But if they can't, Rosenthal said the plaintiffs would seek to add the wrongly rejected applicants to their lawsuit.

After the hearing, DACA recipient Varlene Cooper seemed hopeful.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.