Close to 300 protesters were detained and ticketed in Montreal on Friday evening after participating in a protest that police deemed illegal.

Those fined were demonstrating against the same controversial bylaw that police used to shut down the rally.

Bylaw P-6 requires groups to provide police with an itinerary before they set out on a march. If an itinerary is not submitted ahead of time, police can declare the protest illegal.

The bylaw, approved by Montreal city council last May, also prohibits the wearing of masks during protests.

Police confirmed that 279 individuals were each issued a $637 ticket and three people were arrested for assaulting a peace officer.

Organized by the Anti-Capitalist Convergence, also known as CLAC, the protesters sought to voice their opposition to P-6.

“The right to a peaceful gathering is part of the Canadian Charter of Rights and Freedoms,” said Alexandre Popovic, a member of the Coalition against repression and police abuse. “Obviously some police officers need a basic course in the law.”

CLAC said Friday’s protest was a family-friendly event that aimed to “take back the streets.”

Critics have said the contentious bylaw is a form of police repression.

A series of protests against P-6 through February and March saw nearly 600 people arrested under the bylaw.

With a report from CTV Montreal