The Trump administration is accusing Facebook in a lawsuit of discriminating against U.S. workers in favor of foreigners with special visas to fill more than 2,600 high-paying jobs.

The Justice Department announced the suit Thursday, alleging that the social media giant refused to recruit, consider or hire qualified and available U.S. workers for the positions that Facebook reserved for temporary visa holders. Facebook sponsored the visa holders for “green cards” authorizing them to work permanently.

The action followed a two-year investigation by the Justice Department's Civil Rights Division.

“Facebook intentionally created a hiring system in which it denied qualified U.S. workers a fair opportunity to learn about and apply for jobs” that it instead sought to channel to temporary visa holders, the department said in a news release.

The positions at issue offered an average salary of around $156,000. The department is seeking unspecified civil penalties and back pay on behalf of U.S. workers deemed to have been denied employment.

“Facebook has been cooperating with the DOJ in its review of this issue and while we dispute the allegations in the complaint, we cannot comment further on pending litigation," the company, which is based in Menlo Park, California, said in a statement.

The so-called H-1B visas are widely used by software programmers and other employees of major U.S. and Indian technology companies.

President Donald Trump has long advocated restrictions on both legal and illegal immigration, and has raised concerns for years about foreigners competing with American citizens for jobs.

In June, his administration extended a ban on green cards issued outside the U.S. until the end of the year and added many temporary work visas to the freeze, including those used heavily by tech companies and multinational corporations for their employees. Officials cast the move as a way to free up jobs in an economy reeling from the coronavirus.