Hundreds of anti-vaccination protesters hurled flares at the Slovenian parliament building in Ljubljana.
A group of people were dispersed in the capital city by a police water cannon and tear gas on Wednesday night.
Police said some 8,000 protesters had gathered "against fascism" or "for freedom", making it the largest such demonstration ever in the country.
Several police officers were injured before order was restored late on Wednesday evening.
"Police intervened to disperse the demonstration after protesters began throwing bottles, stones, and firecrackers," a statement said.
"Violence at protests is unacceptable, I call for tolerance," added Anton Olaj, Director General of the Slovenian Police.
Demonstrators were rallying against a new measure on Wednesday that makes COVID-19 health passes mandatory for almost all shops, services, or workplaces.
Slovenians would need to prove they have been vaccinated against COVID-19, are recovering from the infection, or have recently tested negative for the virus.
The EU member state has seen a surge in infections with daily cases exceeding 1,300 for two days in a row. Meanwhile, the 4-day incidence per 100,000 population now stands at 533, one of the highest rates in Europe.
The COVID-19 pass is now required for access to almost all services and workplaces and there have been reports throughout the day of store clerks being hassled, the state STA news agency reported.
Many complaints by disgruntled customers were targeted at petrol stations after the country's largest fuel retailer made it mandatory to show the pass.
The pass is also mandatory for access to Slovenian health services, except for emergency care. Hospitals have offered on-the-spot COVID-19 testing for those who do not have certification.