PARIS — One of France’s biggest companies was placed under formal investigation on Thursday over allegations that it financed terrorist groups, including the Islamic State, and aided and abetted crimes against humanity in a bid to continue operating in Syria as a civil war raged there.

In a rare move against a major French corporation, a panel of French judges appointed by the Paris High Court also charged the company, Lafarge SA, with violating a European Union embargo on oil purchases. The judges said they would investigate the company for endangering the lives of its employees, as well, in order to keep its Syrian cement plant running as the conflict worsened.

The latest charges compound a widening scandal known here as “l’affaire Lafarge.” Eight former company executives, including two former chief executives, have been indicted in recent months on charges of financing terrorism and putting the lives of their workers in Syria at risk. All of those officials have resigned from Lafarge, which merged with the Swiss cement giant Holcim in 2015, after the activity in Syria took place.

The investigation underscores the costs and complexity of doing business in war-torn regions, a challenge faced by companies around the world, especially those in the energy and industrial sectors. In the case of Lafarge, those trade-offs have left it exposed to a French criminal investigation and a lawsuit by 11 former employees, who claim that the company ignored the dangers they faced, and pressured them to keep working.