NEW YORK (AP) — French cement company Lafarge pleaded guilty Tuesday to paying millions of dollars to the militant Islamic State group (IS) to keep a plant operational in Syria while IS was engaged in torturing kidnapped Westerners. Lafarge—which maintains a presence in Ravena—agreed to pay roughly $778 million in penalties.

The Justice Department accused the company of turning a blind eye to the conduct of IS, negotiating a revenue-sharing agreement with the militant group as it was acquiring new territory and as Syria was mired in a brutal civil war. The company’s actions, already investigated by French law enforcement authorities, occurred before it merged with Swiss company Holcim to form the world’s largest cement maker.

Justice Department officials described it as the first case in which a company has pleaded guilty to conspiring to provide material support to a foreign terrorist organization. Lafarge and a long-defunct Syrian subsidiary entered the plea in federal court in Brooklyn, agreeing to criminal fines of $90.78 million and a forfeiture of $687 million.

“There is no justification—none—for a multi-national corporation authorizing payments to a designated terrorist group,” said Assistant Attorney General Matthew Olsen, the Justice Department’s top national security official. “Such payments are egregious violations of our laws, justify maximum scrutiny by U.S. authorities, and warrant severe punishment.”

Prosecutors say the company paid through intermediaries nearly $6 million to IS and al-Nusrah Front, another militant group, in 2013 and 2014. The fixed monthly payments weren’t because of the company’s ideological alignment with the groups, the Justice Department said, but made purely in pursuit of economic advantage.

The company built a $680 million plant in northern Syria in 2011, and—facing competition from cheaper cement imported from Turkey—regarded the payments to IS as a way to ensure the continued operations of the plant. The payments also represented protection for its employees and the transport of raw materials into the facility.

The Justice Department accused the company of using fake contracts and falsified invoices to hide the partnerships, and of committing to a revenue-sharing agreement with IS in hopes that it would incentivize the group to protect the company’s interests. In one message, a company executive told colleagues that “we have to maintain the principle that we are ready to share the ‘cake,’ if there is a cake.’”

After Lafarge evacuated the plant in September 2014, IS took possession of the cement that the company had produced and sold it at prices that would have yielded the group about $3.21 million, prosecutors say. The payments came when other companies were pulling operations out of the region while beheading videos released as publicity by IS made clear to the world its barbaric actions.

For instance, charging documents quote an Aug. 20, 2014, email exchange where company officials describe their negotiations with IS. One official talks about the need to check with a company lawyer about “the consequences of this kind of deal.” One day earlier, IS had released a grisly video of the murder of freelance American journalist James Foley.

“Make no mistake: Lafarge and its leadership had every reason to know exactly with whom they were dealing—and they didn’t flinch,” Deputy Attorney General Lisa Monaco said Tuesday. “Lafarge forged ahead, working with ISIS to keep operations open, undercut competitors, and maximize revenue. And all the while, through their support and funding, Lafarge enabled the operations of a brutal terrorist organization.”

The allegations involve conduct that was earlier investigated by authorities in France. Lafarge previously acknowledged funneling money to Syrian armed organizations in 2013 and 2014 to guarantee safe passage for employees and supply its plant. In 2014, the company was handed preliminary charges including financing a terrorist enterprise and complicity in crimes against humanity.

A French court later quashed the charges involving crimes against humanity but said other charges would be considered over payments made to armed forces in Syria. That ruling was later overturned by France’s supreme court, leading another French court earlier this year to state that Lafarge must face charges of complicity in crimes against humanity. No date for a trial of Lafarge and eight of its executives has been set yet in France.

The wrongdoing precedes Lafarge’s merger with Holcim in 2015, though the Justice Department said the transaction was completed without a thorough examination of Lafarge’s past activities in Syria. In a statement, Holcim said that when it learned of the allegations from the news media in 2016, it voluntarily conducted an investigation and disclosed the findings publicly. It fired the former Lafarge executives who were involved in the payments.

“None of the conduct involved Holcim, which has never operated in Syria, or any Lafarge operations or employees in the United States, and it is in stark contrast with everything that Holcim stands for,” the company said. “The DOJ noted that former Lafarge SA and LCS executives involved in the conduct concealed it from Holcim before and after Holcim acquired Lafarge SA, as well as from external auditors.”

Lafarge said in its own statement that it has “accepted responsibility for the actions of the individual executives involved.” It added: “We deeply regret that this conduct occurred and have worked with the U.S. Department of Justice to resolve this matter.“

It said that the “conduct occurred during a period of intense violence and coercive pressure from terrorist groups,” as the company “tried to manage the grave security challenges in the area surrounding its cement plant during the Syrian civil war.”

IS has been referred to as the Islamic State of Iraq and Syria, or ISIS.