Police have taken the organisers of a Cronulla riots anniversary event to the Supreme Court in a bid to stop the anti-Islam rally from going ahead.

Nick Folkes​ and his anti-immigration group, Party for Freedom, briefly appeared in the NSW Supreme Court on Friday afternoon in a civil case instigated by the NSW Commissioner of Police who is seeking an injunction.

Gangs of youths gathered at North Cronulla Beach in 2005 to "take back the beach". Credit:Robert Pearce

Before entering the court Mr Folkes had a loud verbal stoush with a member of the public who said the Cronulla riots were driven by racism and that he was racist for seeking to glorify them.

Mr Folkes shouted back at the man, declaring "it was a rebellion!".