SEATTLE (AP) — Swaroop Venumbaka was thrilled to receive word from the State Department early last month that after eight years in the United States, he would finally be able to file his final paperwork to become a legal permanent resident on Oct. 1. He spent $2,600 on legal fees and medical exams, took three days off work to get his documents in order, and, most importantly, started planning to travel back to India so his parents could meet his 6-month-old son.

Then, he says, the State Department pulled the rug out from under him. Last Friday, it revised its earlier notice, severely restricting who would be able to file their final green card applications come Thursday. Like tens of thousands of other highly skilled immigrant workers, he was out of luck. His wife will now take the boy to India without him, he says.

“In past three years I haven’t traveled, I haven’t visited my parents or in-laws,” he said Wednesday. “I was excited to take him back to my parents and extended family.”

More than a dozen frustrated, highly skilled immigrants in the same boat filed a federal lawsuit in Seattle this week challenging the State Department’s decision. The complaint seeks class-action status. Their lawyers estimate 20,000 to 30,000 immigrants were affected, spending tens of millions of dollars on legal fees and medical exams for paperwork they now can’t file. Some said they had canceled trips, missed weddings or funerals, and taken time off work to deal with their applications, all for nothing.

Many are from India or China, have advanced degrees, and work at prominent tech companies or medical firms. Venumbaka, 33 and originally from Hyderabad, is a software engineer in Tysons Corner, Virginia, whose company does contract work for the U.S. Department of Housing and Urban Development.

“This case is about what happens when thousands of law-abiding, highly skilled immigrants spend millions of dollars preparing to apply for green cards in reasonable reliance on an agency’s binding policy statement, only to find out at the last minute that a hapless federal bureaucracy has abruptly, inexplicably, and arbitrarily reneged on its promise,” the lawsuit said.

The State Department gave no explanation for the about-face and declined to comment Wednesday, citing the litigation. U.S. Citizenship and Immigration Services, which is also named as a defendant, also declined.

The State Department’s initial bulletin, issued Sept. 9, came in response to an executive order last year from President Barack Obama seeking to improve and simplify the nation’s immigration system. The bulletin thrilled many of the workers who are here on petitions for employment visas, as it was expected to help clear up a yearslong backlog of applications by immigrants from China and India.

But on Sept. 25, the government revised that notice without explanation, severely curtailing who could apply by issuing new and earlier cut-off dates for consideration based on when an application for a green card was filed. The State Department issued no word as to when those left out might be allowed to file.

The backlog has been a major headache for the workers. Because their visa petitions are job-specific, many said they have had to turn down job offers or even promotions while they await their green cards. Similarly, several said they have had to delay buying homes. Without their green cards, they could be forced to return to their native countries on short notice if they get laid off, leaving them little time to sell the properties.

Shashi Singh Rai, 32, of Gurnee, Illinois, said her husband, a systems engineer at a pharmaceutical company, has declined promotions and has put off obtaining a master’s degree in business administration for the past five years while he waits.

When the State Department issued its initial bulletin, she said, they called their parents in India. The couple spent $600 obtaining their birth certificates, Rai said, but her disappointment wasn’t about the money.

“All our dreams are on hold for this. We have waited patiently,” she said. “We have been just hanging by a thread, and that thread has been cut.”

Selva Narayanan, 33, an audio engineer at a Chicago-area mobile technology company, said he has a 2-year-old child and has been waiting to buy a house “to have the American dream,” he said.

“I’m frustrated, disappointed, heartbroken,” he said.

The lawsuit was filed on behalf of 14 individuals and one organization, the International Medical Graduate Taskforce, which comprises physicians dedicated to placing doctors in rural American communities. Their attorneys — R. Andrew Free of Nashville, Tennessee; Gregory Siskind of Memphis, Tennessee; and Robert Pauw of Seattle — requested an emergency order blocking the revised bulletin from taking effect.

Among the plaintiffs are Quan Yuan, a Chinese-born math professor at the University of Wisconsin-Stout, and Qi Wang, a Chinese citizen who lives in Superior, Colorado, and works as a research engineer at the National Renewable Energy Laboratory, the government’s main laboratory for renewable energy research.

Two California Democrats, U.S. Reps. Zoe Lofgren and Mike Honda, issued a statement slamming the State Department and asking that it fix the problem. Both represent the Silicon Valley area of California, a tech hotspot.

“In a time when this country has to compete harder than ever with the rest of the world for high-skilled workers, a confounding and sudden change such as this is unacceptable,” they said.