On Wednesday afternoon, Dr. Pankaj Satija and his wife, both immigrants from India living and working legally in Houston, were abruptly told by immigration officials they had 24 hours to leave the United States. A new policy, they were told, no longer allowed them to extend their temporary permission to stay while they waited for permanent authorization.

The two doctors, who have been here legally for more than a decade and are highly specialized in their fields, were first astounded, then hysterical. Satija had 90 patients scheduled before the end of the week.

"I was breaking down every two hours," said the 40-year-old neurologist who helped found the Pain and Headache Centers of Texas and performs about 200 operations a month.

The couple have never even been issued a parking ticket and pay their taxes quarterly, rather than once a year. Satija's wife, Dr. Monika Ummat, is also a neurologist specializing in epilepsy at Texas Children's Hospital. They have two young U.S.-born children.

But in the latest example of the government taking an unusually harsh stand on immigration and declining to consider cases on an individual basis, Customs and Border Protection officials told them late Wednesday that they were revoking their permits, giving them just a day to pack their bags, collect their children, and return to India where they haven't lived in 15 years.

On Thursday, desperate, they called their legislators. They took to the media along with their attorneys to plead their case, wearing the blue surgical scrubs in which they had hoped to go to work. And they reported, as ordered, ready to leave the country, to customs officials at Bush Intercontinental Airport, where they were told the agency had suddenly reversed course.

"Somebody at a higher level has made that decision," they were told by an agent. "I understand that you are physicians and a lot of lives are at stake."

'Compelling emergency'

The agency offered the couple three months of humanitarian parole, a rare measure allowing immigrants who are otherwise not permitted to enter the United States the opportunity to do so because of a "compelling emergency," enabling them to sort out their paperwork.

It was an unusual act of grace from an administration that has so far seemed intent on removing as many immigrants as it can, making few exceptions, even for those, like the Satijas, with good reasons to stay.

The Department of Homeland Security and Customs and Border Protection did not respond to questions Thursday. Arwen Consaul, a spokeswoman for U.S. Citizenship and Immigration Services, said in an email that privacy rules meant the agencies could not comment on specific cases.

By the numbers: Foreign-born doctors in Texas

Texas, like the rest of America, is reliant on foreign-born physicians, including those born in the seven countries affected by Trump's renewed travel ban. Shading on the map shows counties where at least 50 percent of doctors or more are foreign-trained. Hover for details.

But Satija's lawyer, Amber Gracia with Quan Law Group, said the happy ending nevertheless reflects how harsh the administration's policies have become.

"The doctors are extremely lucky to have had the resources that they had," she said from inside the lobby of the CBP offices at the airport shortly after they received the news. "But most people don't have those resources. This shows that things are only going to get more difficult."

The couple's nightmare began with confusion over two conflicting dates on their paperwork. They have been here legally since 2002 after coming to do research and complete medical residencies and fellowships at such prestigious universities as Duke and Baylor College of Medicine.

Around 2008, the Houston Methodist Hospital System sponsored Satija for permanent residency, known as a green card.

But because of rules limiting how many immigrants can actually receive permanent residency each year and a tremendous backlog in the overwhelmed system, the doctors were provided a provisional status until their green cards become available. The category for India is currently so behind that only immigrants who applied for the labor certification before June 2008 are receiving their green cards.

Satija and his wife renewed their temporary work authorizations and their travel documents every two years as required. They bought a house in West University Place and had two children, Ralph, who is 7, and 4-year-old Zooey.

The problem surfaced last year after new but little-known regulations resulted in their travel documents being issued only for one year, unlike their employment authorization which is valid for two years.

Document discrepancy

Further confusing the issue was that Customs and Border Protection officials stamped their travel document saying that it expired in June this year, when in fact fine print by another agency, U.S. Citizenship and Immigration Services, noted that their document actually lapsed in June 2016.

The doctors did not notice the discrepancy.

They had an unusually busy year and were not planning international travel. Then last October, Satija's brother called from Delhi and said that their father was extremely ill and had been admitted to intensive care. The family needed to go right away.

They immediately bought plane tickets and packed their bags. Upon returning to the United States about a week later, a Customs and Border Protection official at the airport noted the mismatch on their travel document and that, in fact, it had already expired four months previously.

"The officer looked at it and said it's a common mistake, that it was no big deal," Satija said.

They were allowed in through a program known as deferred inspection, which permits certain travelers without the correct paperwork to enter the country so that they can fix the error.

"We work on spines and brains. We're not people who can afford to make mistakes. We're extremely careful," the physician said. "It's all hindsight now, but two years versus one year, in such small print, my father being sick … it just slipped our notice."

The Satijas immediately applied to renew their expired travel document, which is known as advanced parole and allows immigrants waiting for their green cards to leave the country while their applications are being processed.

As required, they checked in with Customs and Border Protection officials every month to extend their temporary permission to stay while they awaited the more permanent approval from U.S. Citizenship and Immigration Services.

Wednesday they were informed that they had been approved for the advanced parole, but that the paperwork was still in the mail. That same day they checked in again with Customs and Border Protection officials, who said the agency now had a new policy and was no longer able to extend their deferred inspection.

"Somebody up there has decided you have to leave the country in the next 24 hours," the agent told the couple as he gave them until the next day to sort out their affairs.

On Wednesday afternoon the couple convinced the federal officials to allow them to call their lawyers, who advised them not to sign any paperwork. They were told by the agent to return to customs offices at the airport and be ready to leave immediately for India.

The Satijas and Quan Law Group attorneys began furiously making calls. Republican Sen. John Cornyn and U.S. Rep. John Culberson, R-Houston, were immediately responsive, Satija said.

The doctor pressed for a postponement of at least a few weeks, noting that he has dozens of surgeries in the next few days including a critical operation to remove hardware from a woman's spine.

"There's been a technical error made here and our situation is completely an oversight, an error made in innocence," he said. "But taking me and Monika away from our patients right now jeopardizes so much for the citizens of this country."

'Not criminals'

Gordon Quan, the law firm's managing partner, said the dilemma illustrates not only the black-and-white view the Trump administration has taken on immigration matters, but the harshness of the system, the complexity of which most Americans don't understand.

"These are not tough decisions. These are not criminals, not a threat to society," he said. "It's just the rigidity of the system … and instead of trying to work with people, the new administration is just trying to force them out, no matter what."

Satija and his wife, who have hardly slept since Wednesday afternoon, said they were relieved at the decision to allow them to stay - but also sobered.

"If this has happened to us, it can happen to so many other people," Satija said. "The system is certainly broken."