Nearly 2,500 partygoers set up the rave after skirmishes with police, setting at least one police car on fire.

Some 2,500 partygoers attended an illegal New Year rave in northwestern France, violently clashing with police who failed to stop it and sparking concern the underground event could spread the coronavirus, authorities said.

The revellers had set up the illegal rave in Lieuron, south of Rennes in Brittany, after skirmishes with police, said a statement from the local prefecture on Friday.

Many were still on the site as a sanitary cordon was thrown up around it.

A woman poses for the photographer during the party in a disused hangar in Lieuron [Jean-Francois Monier/AFP]

Local gendarmes tried to “prevent this event but faced fierce hostility from many partygoers” who set one of their cars on fire and threw bottles and stones, the statement said.

Those present had come from across France and even abroad, it said.

By Friday evening, the sound of techno music could still be heard from the party venue, though police were preventing any newcomers from joining the rave, according to an AFP news agency’s photographer.

“Police controls are taking place around the site. Verbal warnings are being given to everyone leaving,” the police said on social media.

Prosecutors have opened an investigation into the illegal organisation of a musical gathering and premeditated violence against people in authority.

Speaking later on BFM TV, interior ministry spokeswoman Camille Chaize said there had been “great hostility, great violence” against the forces of law and order, without indicating when the police would be able to enter the rave site.

Such mass gatherings are strictly banned across France to prevent the spread of COVID-19, and a nationwide 8pm curfew – which was not lifted for the New Year – applies across the country.

Vehicles registered from all over France were parked at the site [Jean-Francois Monier/AFP]

Reports said the rave party took place in an empty warehouse belonging to a storage company. Vehicles registered from all over France were parked at the site.

Participants interviewed by AFP said the revellers had included partygoers from foreign countries, including Spain and Britain.

One participant, who gave his name as Jo from the Alsace region of eastern France and refused to be identified further, said they had all met at a designated spot on Thursday evening in the parking lot of a shopping centre.

Then the convoy headed for Lieuron where the police tried to prevent them from passing, he said.

He also acknowledged that “very few had respected social distancing” at the event.

French authorities have been worried about mass rave parties throughout the pandemic, but New Year’s night was a particular concern.

In the southern city of Marseille, security forces halted an illegal party of some 300 people, police said. More than 150 people were warned, and the three suspected organisers were arrested.

Interior Minister Gerald Darmanin said 132,000 police officers were deployed across France for the New Year celebrations to ensure security and that the curfew was respected.

Darmanin said on Twitter on Friday that he was working with local officials “on re-establishing a normal situation” while keeping people safe.

The French health ministry reported 19,348 new coronavirus infections over the past 24 hours on Friday, slightly less than Thursday’s 19,927 and well below Wednesday’s more than one-month high of 26,457.

France’s cumulative total of cases now stands at 2,639,773, the fifth highest in the world.

The country is set to impose an earlier curfew in 15 northeastern and southeastern departments from Saturday to combat the spread of the coronavirus, starting at 6 pm instead of 8 pm, the government said on Friday.

President Emmanuel Macron on Thursday said everyone in France should be able to get a COVID-19 vaccine if they want it, amid broad criticism over the slowness of the vaccination programme.