The Trump administration made it harder for tech companies to import foreign workers just as the annual lottery for visas began Monday. Guidelines issued Friday by the U.S. Citizenship and Immigration Services (USCIS) affect the H-1B visa process and take effect immediately.

The guidelines require proof a job is so complicated, computer programmers need more advanced knowledge and experience to combat what the agency characterized as fraud and abuse.

Read: Sanctuary Cities Threatened Over DOJ Grants

Critics, however, said tightening the H-1B program makes little economic sense since the program is designed for specialty fields in science, engineering and information technology where talent sometimes is scarce.

“Employers who abuse the H-1B visa program negatively affect U.S. workers, decreasing wages and job opportunities as they import more foreign workers,” USCIS said in a press release.

The Department of Justice Monday warned employers not to discriminate against U.S. workers.

Read: Will Trump Winery Be Affected By President's Immigration Policy?

“The Justice Department will not tolerate employers misusing the H-1B visa process to discriminate against U.S. workers,” Acting Assistant Attorney General Tom Wheeler of the Civil Rights Division said in a statement. “U.S. workers should not be placed in a disfavored status, and the department is wholeheartedly committed to investigating and vigorously prosecuting these claims.”

The Immigration and Nationality Act prohibits discrimination on the basis of national origin or citizenship in hiring, firing or recruiting.

President Donald Trump wants U.S. companies to hire more Americans instead of outsourcing jobs or bringing in cheaper foreign labor. Both Democrats and Republicans in Congress have introduced legislation to revamp the H-1B program, and Trump reportedly is considering an executive order in the absence of congressional action.

 “The H-1B visa program should help U.S. companies recruit highly skilled foreign nationals when there is a shortage of qualified workers in the country. Yet, too many American workers who are as qualified, willing and deserving to work in these fields have been ignored or unfairly disadvantaged,” USCIS said.

Tech companies sought to bring 13,000 computer programmers into the United States under the H-1B program in 2016 for an average salary of about $72,000, Bloomberg Intelligence reported. IBM and the Indian firm Tata Consultancy Services Ltd. were responsible for a large number of the applications.

USCIS said it will conduct random site visits at companies that have an unusually high number of H-1B workers to make sure they are making a good-faith effort to recruit Americans.

“These site visits are not meant to target nonimmigrant employees for any kind of criminal or administrative action but rather to identify employers who are abusing the system,” the agency said.

The Justice Department has fined companies that have discriminated against U.S. workers, Ars Technica reported, including a firm in the Northern Marianas Islands that was fined $12,000 and ordered to pay $40,000 in back wages for hiring foreign workers rather than U.S. citizens for dishwashing jobs. A Louisiana sheet metal company last year agreed to pay a $30,000 fine and $115,000 in back wages over charges it preferred foreign workers.

Immigration officials last month suspended a paid process for expediting visas for certain workers, a step some saw as the first for the process of dismantling the H-1B program. Congress has capped the annual number of H-1B visas awarded to 65,000 with 20,000 more available for people with master’s degrees or higher.

"It doesn't make a lot of economic sense to deny companies the ability to do this [import workers]," James Crabtree, a visiting senior research fellow at the Lee Kuan Yew School of Public Policy in Singapore, told CNBC Monday.

"What they are doing today is just a tiny tweak that isn't really going to affect anyone very much. The risk is that coming down the tracks are much, much bigger changes to the system which will be much more damaging."