Companies must layoff H-1B temporary workers before American citizens. Companies cannot hire an H-1B if they just laid off American workers that performed the same job.
There is nothing concrete in the H-1B laws concerning the pecking order in a layoff situation. There is nothing to stop a company from hiring enough H-1Bs to replace their American workers, and then fire all of the American workers. Once a company hires an H-1B, they can let an American worker go. For the reverse, there are some rules. A company is not supposed to hire an H-1B within 90 days of firing an American worker for the same job. However, as with all of the other H-1B laws intended to protect American workers, compliance is not checked or enforced.
Although many interpret the H-1B laws as having protections for American citizens, the frightening truth according to the Department of Labor in Washington D.C. is: “Except in certain very specific conditions, outlined in the American Competitiveness and Workforce Improvement Act of 1998, it’s perfectly legal to replace U.S. workers with H-1Bs.” A detailed reference of the law is available HERE.