PARIS (AP) – French President Emmanuel Macron on Tuesday defended a military operation to free hostages held in Burkina Faso that left two French special forces officers dead.

Crowds lined the Alexander III Bridge in central Paris as the funeral cortege carrying the coffins of the two Marine commandos drove slowly past, part of an elaborate national ceremony honoring the men.

“The mission was perilous. The mission was necessary,” Macron said in a solemn, emotional speech at the gold-domed Invalides monument that houses Napoleon’s tomb. French hostages “were under threat. We had to save them,” Macron said.

He shook hands with members of the special forces who attended the ceremony with scarves over their faces to conceal their identities.

The two officers, Cedric de Pierrepont and Alain Bertoncello, were killed Friday in an operation that also left four extremists dead.

The officers were part of France’s Barkhane military operation aimed at rooting out Islamic extremists in Africa’s Sahel region. Macron vowed that France “will continue to fight tirelessly against terrorism” in the Sahel, the Syrian region and on French soil.

The operation liberated two French tourists who had been visiting a wildlife reserve in Benin, as well as an American and a South Korean. Macron paid his respects to the French tourists’ local guide, who was killed by the hostage-takers.

The tourists drew criticism in France for venturing into an area near Benin’s border with Burkina Faso that is known to be dangerous. The criticism peaked with Macron’s decision to greet the freed captives at a French military airport Saturday, along with the South Korean hostage.

No information was publicly released about the identity of the American woman, who was put in the care of U.S. authorities.

Macron justified the operation in his speech honouring the slain officers Tuesday, saying that the kidnappers were planning to hand over the hostages to “terrorists” in Mali within a few hours.

“France is a nation that doesn’t abandon its children, whatever the circumstances,” he said. “Those at the other end of the planet, those who attack a French person, should know that our country will never back down.”