A Polish law banning almost all trade on Sundays has taken effect, with large supermarkets and most other retailers closed for the first time since the collapse of communism.

The legislation, sought by the Solidarity trade union and supported by the Catholic Church, will limit shopping to the first and last Sundays of the month.

First proposed by Solidarity in 2016, the gradual ban will only allow trade on the last Sunday of the month starting next year, before a wider ban will outlaw shopping on most Sundays from 2020. The new law applies to Polish supermarkets and foreign-owned hypermarket chains, as well as other non-Polish outlets.  It will still allow online shopping, while smaller, locally-owned shops including bakeries and petrol stations will still be able to trade.

Solidarity said it introduced the change to ensure retail staff get free time at the weekends.

Liberal opposition and other critics argued that the new legislation will limit job opportunities for students and affect cross-border shopping from the Baltic States, Belarus, Ukraine and Slovakia.

The All-Poland Alliance of Trade Unions also opposed it, arguing that it will push employees to work longer hours on Fridays and Saturdays and that the work will be harder because there will be more customers. Anyone infringing the new rules will face a fine of up to 100,000zl (£21,180), while repeat offenders may face a prison sentence.

The retailers banned from Sunday trading will see the ban’s effect on their revenues, however they will have time to come up with strategies to overcome this.

Deputy Head of President Andrzej Duda’s office Pawel Mucha said that the Sunday trading restriction is ‘a certain cause for complaint from the consumer’s point of view’. He added that the restrictions ‘can have positive effects for small and medium entrepreneurs’.

“If we have a huge hypermarket closed, then there is a natural gap for smaller shops and if it evolved in this direction, I would be extremely satisfied,” he told public broadcaster Polish Radio on Monday.

The right-wing Law and Justice (PiS) government, which is close to the Catholic Church, got behind the ban and passed the legislation in November.

Until now, stores in Poland have remained closed for 12 days a year during major national or religious holidays.

Hungary also tried to ban Sunday shopping back in 2015, but it was backtracked the same year after it proved widely unpopular. Switzerland and Norway also limit Sunday shopping, while Austria has a blanket ban.