Updated

Quebec's provincial government passed an emergency law Friday that sets restrictions on demonstrations and shuts some universities as the government seeks to end three months of protests against tuition hikes.

The law risks inciting students who called it an act of war.

The law passed 68-48.  Among the controversial provisions is one that calls for police to be informed eight hours before a protest and told the route of any demonstration that includes 50 or more people. Critics called it an affront to civil rights.

Protests were planned in Quebec's largest city, Montreal, later Friday to condemn the vote, which students and supporters say limits their ability to demonstrate their disapproval of the fee hikes.

Hundreds of protesters gathered in downtown Montreal on Thursday night as the government introduced the bill to quell the most sustained student protests in Canadian history. But there was none of the violence that erupted Wednesday when windows were smashed, more than 120 people were arrested and police and protesters were injured.

On Friday, the city of Montreal passed an ordinance restricting protesters from wearing masks during demonstrations, which includes fines between $500 and $3,000. The city also said demonstrators will have to provide details of their itineraries beforehand.

Officials have said they believe protesters wearing masks have been causing the most trouble. A similar bylaw was under consideration in Quebec City.

"Our cities can no longer become targets," Montreal Mayor Gerald Tremblay said. "It's time to reclaim our streets, our neighborhoods, our cities."  Rights groups also have protested that bylaw, calling it a restriction on their democratic right to demonstrate.

Quebec Premier Jean Charest said the provincial legislation would not roll back the tuition hikes of $254 per year over seven years. Rather, it would temporarily halt the spring semester at schools paralyzed by walkouts and push up the summer holidays. Classes would resume earlier in August.

The law imposes harsh fines on protesters who block students from attending classes.

Proposed fines range from $1,000 to $5,000 for a student, $7,000 to $35,000 for a student leader and between $25,000 and $125,000 for unions or student federations if someone is prevented from entering an educational institution.

The Quebec Bar Association said it had serious concerns about the law and said the scale of the restraints on fundamental freedom wasn't justified.

Opposition Parti Quebecois leader Pauline Marois called Friday "one of the darkest days of Quebec democracy," and said Charest should hold elections because of the unpopularity of the law.

Martine Desjardins, one student leader, blamed the government for "letting the conflict deteriorate" and said it was seeking to "drown the conflict in the tribunals."

Student leader Gabriel Nadeau-Dubois called the law the "murder of the right to demonstrate."

He said his group would challenge the law before the courts and called on protesters to take part in a march in great numbers next Tuesday, which will mark the 100th day of protests.

But embattled Education Minister Michelle Courchesne said before the vote that despite the legislation, talks would go on and an agreement could still be reached with the students.

"Even if there is a special legislation tonight, tomorrow, there can still be an agreement after the law," she said.

She stressed that the law doesn't prevent students from protesting, and said she remained open to a dialogue with students.

Some of the loudest cheers early on Friday were reserved for one man who stood on a garbage can and burned what looked like a copy of the government bill.

The conflict has caused considerable social upheaval in the French-speaking province known for having more contentious protests than elsewhere in Canada — and the country's the lowest tuition rates.

The U.S. consulate in Montreal last month warned visitors and U.S. expats to be wary of demonstrations.