CNN Business  — 

Activision Blizzard will pay $18 million to settle a lawsuit by a US government agency alleging harassment and discrimination, the firm said Monday.

The gaming company, which owns hugely popular titles such as “Call of Duty,” “World of Warcraft” and “Candy Crush,” announced it had reached a settlement agreement with the Equal Employment Opportunity Commission (EEOC) in response to a complaint the agency filed earlier in the day.

As part of the settlement agreement, which is subject to court approval, Activision Blizzard (ATVI) said it will create an $18 million fund “to compensate and make amends to eligible claimants.” Any remainingamount will either be donated to charities focused on harassment, gender equality and women in the video game industry, or will be used to create diversity and inclusion initiatives within the company, it added.

“There is no place anywhere at our company for discrimination, harassment, or unequal treatment of any kind, and I am grateful to the employees who bravely shared their experiences,” Activision Blizzard CEO Bobby Kotick said in a statement. “I remain unwavering in my commitment to make Activision Blizzard one of the world’s most inclusive, respected, and respectful workplaces,” he added.

In a complaint filed earlier on Monday, the EEOC accused Activision Blizzard of subjecting female employees to sexual harassment and retaliating against them for complaining about harassment. The company also “discriminated against employees due to their pregnancy,” the complaint alleged.

Kotick said the company will “continue to be vigilant” in stamping out harassment and discrimination. “We thank the EEOC for its constructive engagement as we work to fulfill our commitments to eradicate inappropriate conduct in the workplace,” he added.

The EEOC is one of several agencies to go after Activision Blizzard this year, with the company embroiled in controversy ever since an earlier lawsuit by California’s Department of Fair Employment and Housing.

That lawsuit, filed in July, alleged a “frat boy” work culture where women were subjected to constant discrimination and harassment. It kicked off a storm of dissent from within Activision Blizzard’s own workforce that ultimately led to hundreds of employees staging a walkout at the company’s offices in Irvine, California.

The company is also facing a complaint from the National Labor Relations Board filed earlier this month accusing it of unfair labor practices, as well as an investigation by the Securities and Exchange Commission that the company said last week it is cooperating with. Those actions are all still pending, and Activision Blizzard said it “continues to productively engage with regulators.”

Correction: A previous version of this story mischaracterized the EEOC’s complaint against Activision Blizzard and the company’s agreement with the EEOC. The complaint and agreement, which is pending final approval, covers harassment and pregnancy discrimination.