ROME — Protests erupted in Italy as one of the most stringent anti-coronavirus measures in Europe went into effect Friday, requiring all workers, from magistrates to maids, to show a health pass to get into their place of employment.

Police were out in force, schools planned to end classes early and embassies issued warnings of possible violence amid concerns that the anti-vaccination demonstrations could turn violent, as they did in Rome last weekend.

The so-called “Green Pass” shows proof of vaccination, a recent negative test or of having recovered from COVID-19 in the past six months. Italy already required them to access all sorts of indoor environments, including restaurants, museums, theaters, and long-distance trains.

But the addition of the workplace requirement has sparked heated debate and opposition in a country that was a coronavirus epicenter early in the pandemic and where vaccination rates are among the highest in Europe.

“Today they are stepping on our Constitution,” said an anti-vaccine protester, Loris Mazzarato. “I say NO to this discrimination.”

He was among the hundreds of demonstrators in Trieste, where protests by port workers refusing to show a Green Pass to get to work threatened to affect commercial activities, though early reports suggested the ports were operational. Protesters shouted “Liberta” (Freedom) in a largely peaceful demonstration in Florence.

Implementation of the new requirement varies: Electronic scanners that can read cellphone QR codes with the Green Pass were set up at bigger places of employment, such as the office of Italian Premier Mario Draghi and the headquarters of state railway company Trenitalia.

But at smaller places of work, from restaurants to tennis clubs, employers and managers had to download an app that can scan the codes. While it was unclear how strictly Italy would enforce the requirement, the fear of spot checks drove employers to comply, at least initially.

Sanctions for employers who fail to check employees range from 400 to 1,000 euros. A worker who fails to show a Green Pass at work is considered to be absent without justification; if the worker shows up anyway without a valid Green Pass, he or she could face fines from 600 euros to 1,500 euros.

But there were some anomalies: Supermarket cashiers and hairdressers have to have a “Green Pass” to work, but their clients don’t, and need only to wear a mask indoors.

The aim of the requirement is to encourage even higher vaccination rates in a country that has kept the latest delta variant-fueled resurgence largely under control, reporting around 67 cases per 100,000 inhabitants and a daily death toll that hasn’t exceeded 70 for months.

In Italy, 80 percent of the population over age 12 has already been fully vaccinated. But for those people who can’t or won’t get their shots, the expanded pass requirement imposes a burden of getting tested every 48 hours just to be able to go to work, though people with a proven medical condition that prevents them being vaccinated are exempt.

Some employers are offering free tests at work, but the government has refused calls to make testing free across the board. Currently rapid tests run from 8 euros for children to 15 euros for adults.

Testing capacity proved to be Italy’s Achilles’ heel during the first wave of the pandemic, and the governor of the Veneto region, Luca Zaia, has warned it won’t be able to keep up with the new demand. He has called for the government to let people secure Green Passes based on results from at-home test kits rather than having to go to a pharmacy for a rapid test.

“If the law says people have the right to work with a test every 48 hours, they have to guarantee this right,” Zaia said.

Not even the Vatican was spared opposition to the new requirement: Three Swiss Guards quit and another three were suspended after they refused to get vaccinated before the Vatican’s green pass requirement went into effect.

The Green Pass requirement is not a vaccine mandate, since a negative test or proof of being cured of COVID-19 are other ways to get it. In Italy, only health care workers are required to be vaccinated, and teachers and school administrators have had to have a Green Pass to work since Sept. 1.

The Green Pass requirement for all categories of workers though went beyond other European countries. France has had a “virus pass” since the summer to access indoor activities and events, but it isn’t required for employees to get into work.

In Greece, employers are required by law to maintain a record of the vaccination status of staff who access work premises. Workers must carry a vaccination certificate that can be scanned using a government application or pay for weekly testing.

In the U.S., the Biden administration imposed sweeping rules in September mandating all employers with more than 100 workers to require them to be vaccinated or test for the virus weekly, affecting about 80 million Americans. Another 17 million workers at health facilities that receive federal Medicare or Medicaid also have to be fully vaccinated, while vaccination is also required for employees of the executive branch and contractors who do business with the federal government — with no option to test instead.