WASHINGTON -- Facebook is paying a US$4.75 million fine and up to $9.5 million to eligible victims to resolve the Justice Department's allegations that it discriminated against U.S. workers in favor of foreigners with special visas to fill high-paying jobs.

Facebook also agreed in the settlement announced Tuesday to train its employees in anti-discrimination rules and to conduct more widespread advertising and recruitment for job opportunities in its permanent labor certification program, which allows an employer to hire a foreign worker to work permanently.

The department's civil rights division said the social network giant “routinely refused†to recruit, consider or hire U.S. workers, a group that includes U.S. citizens and nationals, people granted asylum, refugees and lawful permanent residents, for positions it had reserved for temporary visa holders.

Facebook sponsored the visa holders for “green cards†authorizing them to work permanently. The so-called H-1B visas are a staple of Silicon Valley, widely used by software programmers and other employees of major U.S. technology companies.

Critics of the practice contend that the foreign nationals will work for lower wages than U.S. citizens. The tech companies maintain that's not the case, that they turn to foreign nationals because they have trouble finding qualified programmers and other engineers who are U.S. citizens.

“In principle, Facebook is doing a good thing by applying for green cards for its workers, but it has also learned how to game the system to avoid hiring U.S. tech workers,†said Daniel Costa, director of immigration law and policy research at the liberal-leaning Economic Policy Institute. “Facebook started lobbying to change the system more to its liking starting back in 2013 when the comprehensive immigration bill that passed the Senate was being negotiated.â€

The settlement terms announced Tuesday are the largest civil penalty and back-pay award ever recovered by the civil rights division in the 35-year history of enforcing anti-discrimination rules under the Immigration and Nationality Act, officials said. The back pay would be awarded to people deemed to have been unfairly denied employment.

The government said 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.

“Facebook is not above the law and must comply with our nation's federal civil rights laws, which prohibit discriminatory recruitment and hiring practices,†Assistant Attorney General Kristen Clarke told reporters in a telephone conference. “Companies cannot set aside certain positions for temporary visa holders because of their citizenship or immigration status.â€

Facebook also agreed in a separate settlement with the Labor Department to expand its recruitment for U.S. workers and to be subject to ongoing audits to ensure compliance.

The company based in Menlo Park, California, said it believes it met the government's standards in its practices. It said it agreed to the settlements to end the litigation and move ahead with its permanent labor certification program - which it called an important part of its “overall immigration program.â€

“These resolutions will enable us to continue our focus on hiring the best builders from both the U.S. and around the world, and supporting our internal community of highly skilled visa holders who are seeking permanent residence,†Facebook said in a statement.

Facebook says it ended the April-June quarter this year with over 63,400 full-time employees globally and has 3,000 current job openings.

The lawsuit was filed against Facebook last December by the Justice Department under the Trump administration. The alleged violations are said to have occurred from at least Jan. 1, 2018 to at least Sept. 18, 2019.

A $4.75 million fine and $9.5 million in back pay are a trifle for a company valued at $1 trillion with revenue of nearly $86 billion last year. But the announcement comes at a time of intense public discomfort and scrutiny for Facebook.

Public allegations and testimony to Congress from a former Facebook data scientist that the company disregarded internal research showing harm to children have raised a public outcry and calls for stricter government oversight of the company. The former employee, Frances Haugen, accused Facebook of prioritizing profit over safety and being dishonest in its public fight against hate and misinformation.

The company is also awaiting a federal judge's ruling in an epic antitrust suit filed against it by the Federal Trade Commission. Calls from critics and lawmakers of both parties to break up the behemoth company are intensifying.