On a Sunday afternoon, customers at a Géant Casino supermarket browsed the aisles and lined up to buy meat, fish and other groceries. It was a typical shopping experience except for one thing: All the cashiers had gone home. Customers scanned items at automated checkout stations as security guards hovered nearby.

That the store was even open was unusual. French labor rules prohibit most shops from employing workers past 1 p.m. on Sundays. But as e-commerce and online giants like Amazon usher in an era of round-the-clock spending, retailers are amping up the use of automated cashiers to help them compete.

The move has caused an outcry in France, where Sundays are traditionally a rest day for workers and families. While self-checkout machines are often used alongside cashiers, labor unions say that tilting toward fully cashierless operations threatens the French way of life by encouraging American-style consumerism and automation, putting thousands of jobs at risk.

“Sundays are sacred,” said Patrice Auvinet, the head of the General Confederation of Labor union in Angers, a midsize city in western France. “If they change that, it will change French society. And if automated cashiers become normalized, it will have a catastrophic impact on workers.”

Groupe Casino, the country’s biggest supermarket operator, began testing Sunday-afternoon openings in August using only automated machines at the warehouse-size supermarket in Angers. It has expanded the experiment to at least 20 other megastores around the country, igniting raucous protests.

This week, Casino further riled unions by becoming the first supermarket chain in France to keep most of its stores open, including the one in Angers, on Christmas Day using only self-checkout machines. Casino said in a statement that it planned to do the same on New Year’s Day, and that the move was an extension of how it was already operating on Sunday afternoons.

President Emmanuel Macron paved the way for Sunday openings in 2015 when he was France’s economy minister, loosening regulation of business hours around Paris and other touristic areas to stimulate the economy. Unions fought the measures, citing labor rights won over decades.

But retailers say the restrictions that apply outside city centers have become a bind as e-commerce disrupts the retail landscape. As brick-and-mortar outlets lose sales to online merchants, companies say they must either compete or perish.

“The world is changing, and we’re in a very competitive environment,” said Sébastien Corrado, the marketing director of Groupe Casino. “The internet doesn’t have frontiers, so we need to adapt to new modes of consumption that let us stay in the game and be winners.”