AMSTERDAM (Reuters) - An annual pre-Christmas festival in the Netherlands this weekend was marred by scuffles and arrests as rival groups demonstrated their views on a blackface character who traditionally accompanies the arrival of St. Nicholas.

Opponents of Zwarte Piet, or Black Pete, say the custom of white people donning black face paint, red lipstick and frizzy wigs is racist. But a majority of Dutch people, with fond childhood memories of the start of the gift-giving season every Nov. 17, see it as harmless fun.

This year’s celebrations came days after a court rejected an attempt by anti-racism groups to ban Black Pete from state television.

Supporters of Black Pete attacked several protesters in Rotterdam, where activists had hung a banner reading “Black Pete is Racism” from the city’s Erasmus Bridge.

Confrontations in several other cities were prevented by police, who themselves came under attack from pro-Pete groups.

Football supporters in Eindhoven threw eggs and beer cans at police and anti-Pete protesters. Anti-Pete demonstrations in Nijmegen and Zwolle were canceled after mayors said they could not guarantee protesters’ safety.

A group of 40 pro-Pete demonstrators were detained in Tilburg on Sunday as police said they were out looking for a fight. The biggest ceremony, a nationally-televised arrival in Zaanstad, went ahead without incident amid heavy security.

Justice Minister Ferdinand Grapperhaus said pro-Pete groups who had committed acts of violence would be prosecuted. There were reports of “provocations” but no violence by anti-Pete protesters.

“Everyone has the right to freedom of opinion,” Grapperhaus said. “But public disorder, throwing things - the police will always act to stop that.”

In Dutch lore, St. Nicholas travels once a year from Spain on a steamboat laden with presents, accompanied by dozens of helpers who traditionally have their faces painted black. Together, children are told, they travel the land for two weeks, handing out cookies and presents, finishing with a night of gifts and poems on Dec. 5.

In Amsterdam, St. Nicholas, “Sinterklaas” in Dutch, arrived on Sunday with 350 helper Petes wearing only smudges on their faces, rather than full black face paint: one variant of the story says Pete is black with soot from climbing down chimneys to deliver presents.