A controversial Montreal bylaw that required groups planning a demonstration to give their route to police ahead of time and prohibited protesters from wearing masks is now off the books.

A notice of motion to repeal the bylaw, known as P-6, was officially repealed at Tuesday morning's council meeting.

Mayor Valérie Plante confirmed last month the city is making the change, saying she doesn't want to limit citizens' right to protest.

She cited, as an example, the massive peaceful climate change demonstration earlier this fall that drew half a million people to the streets.

"It's to find a balance, and for us repealing the P-6 bylaw was the thing to do support the right to protest," Plante said.

Projet Montréal had pressed for the law to be scrapped when it was in opposition.

Bylaw passed for 2012 student protests

Anarchopanda, seen here in 2013, was a fixture on Montreal streets during the Quebec student protests. (Ryan Remiorz/The Canadian Press)

Montreal police has not enforced the bylaw since 2015.

It was put in place at the height of the student protests in May 2012 by former mayor Gérald Tremblay.

After the bylaw was passed, hundreds of students and their supporters were handed $637 tickets for not following the rules, often after being kettled, or encircled, by police. Many were given multiple tickets, totalling thousands of dollars.

The bylaw was the target of legal challenges and often, confusion.

In April 2013, for instance, Marc Parent, the city's police chief at the time, stressed his officers would not arrest hockey fans celebrating a Canadiens' playoff victory if they ended up in the streets.

Portions of the bylaw have already been struck down by a successful court challenge launched by Julien Villeneuve, also known as "Anarchopanda," the costumed mascot of Quebec's 2012 student protests.

Last year, the Quebec Court of Appeal ruled the requirement to provide an itinerary was "arbitrary" and "unreasonable," and the ban on masks was unconstitutional.

The Plante administration did not appeal the ruling.

A victory for freedom of expression

Hundreds of thousands took to the streets during what came to be known as the Maple Spring, the student protests against proposed tuition fee hikes in 2012. (Graham Hughes/The Canadian Press)

Villeneuve, a philosophy teacher at Collège de Maisonneuve, told CBC Montreal's Daybreak he was "delighted" by the decision to repeal the bylaw.

"It's been a long time coming," he said last month.

He said the bylaw was so broad and "ill-defined" that it gave police the power to break up nearly any protest — or even a public gathering of friends.

Villeneuve pointed out that P-6 has its roots in a 1969 bylaw put in place by former mayor Jean Drapeau. That bylaw was an attempt to limit protests by police and firefighters, he said.

Quebec's Ligue des droits et libertés, a civil rights group, hailed Plante's decision to repeal the bylaw as an "important victory" for freedom of expression.

The group's spokesperson, Lynda Khelil, said in a statement Tuesday P-6 and the previous 1969 bylaw allowed for "political profiling."