The prickliness and glacial ineptitude of the immigration system is old news to millions of would-be Americans. Immigrants who play by the rules know that the rules are stringent, arbitrary, expensive and very time-consuming. But even the most seasoned citizens-in-waiting were stunned by the nasty bait-and-switch the federal bureaucracy pulled on them this month. After encouraging thousands of highly skilled workers to apply for green cards, the government snatched the opportunity away.

The tease came in a bulletin issued by the State Department in June announcing that green cards for a wide range of skilled workers would be available to those who filed by July 2. That prompted untold numbers of doctors, medical technicians and other professionals, many of whom have lived here with their families for years, to assemble little mountains of paper. They got certified records and sponsorship documents, paid for medical exams and lawyers and sent their applications in. Many canceled vacations to be in the United States when their applications arrived, as the law requires.

Then they learned that the hope was effectively a hoax. The State Department had issued the bulletin to prod Citizenship and Immigration Services, the bureaucracy that handles immigration applications, to get cracking on processing them. The agency is notorious for fainting over paperwork — 182,694 green cards have been squandered since 2000 because it did not process them in time. That bureaucratic travesty is a tragedy, since the annual supply of green cards is capped by law, and the demand chronically outstrips supply. The State Department said it put out the bulletin to ensure that every available green card would be used this time.

After working through the weekend, the citizenship agency processed tens of thousands of applications. On Monday, the State Department announced that all 140,000 employment-based green cards had been used and no applications would be accepted.