They challenged the sale in court, and on Friday they celebrated the judges’ decision.

“It’s a partial but essential victory,” the workers’ lawyer, Ralph Blindauer, said. “Hali Food is finished, dead. They are going to have to reconsult the workers,” he said, at a McDonald’s that is unusual for having a strong union.

Still, the lawyer said it was unclear whether the restaurant would continue to be a McDonald’s. “I don’t know what McDonald’s is going to do. They can come back with another project,” he said.

A McDonald’s spokesman said in a statement that the franchisee who owned the restaurant would appeal, adding that the court’s decision did not take into account the “latest commitments made by the new owner” to “strengthen a project that would ensure both the jobs and the site.”

The workers, though, were jubilant. “We’re very relieved. The court believed the employees,” said Salim Grabsi, a local teacher and former employee who has led the fight to keep the McDonald’s operating as a branch of the American fast-food giant.

“For four months we haven’t eaten or slept,” he said. “We’re proud to be French. They’ve listened to the little folks in the neighborhood.”