About 50 anti-discrimination activists have staged a protest outside the Melbourne Magistrates' Court as three members of an anti-Islam group appeared on religious vilification charges.

Blair Cottrell, Christopher Shortis and Neil Erikson of the United Patriots Front (UPF) group have been charged with religious vilification and behaving in an offensive manner in public.

The charges relate to a mock beheading staged during protests against a Bendigo mosque in 2015.

Police surrounded the co-accused as they left the court to prevent contact with the protesters.

Loading

Outside the court, Shortis said beheading the effigy was an example of free speech.

"We will fight those charges vigorously and, not only that, lawfully," he said.

"It was a dramatic, dramatised political statement showing the very practices that exist in Islamic countries today.

"Am I saying every Muslim is capable of this thing? No. I'm merely attacking the theology of Islam."

Debbie Brennan from the Campaign against Racism and Fascism group said the mock beheading was an extremely racist stunt.

"That speech is not tolerable," she said.

"We say that's nothing to do with free speech — it's everything to do with hate speech.

"We see a very real threat and we are here to stop it … and not allow them their hate speech."

The matter has been adjourned until May.

Protesters outside court ahead of the appearance of United Patriots Front leaders. ( ABC News: Cameron Best )