Image caption The protests over rising tuition fees have at times turned violent since they began 14 weeks ago

The provincial government of Quebec has passed emergency legislation to curtail the most sustained student protests in Canadian history.

The law will shut some universities early and impose fines on protesters blocking students from classes.

Thousands of people protested in the streets of Montreal on Friday after the 68-48 vote.

Demonstrations against rising tuition fees began 14 weeks ago, escalating into a standoff with the government.

The bill will remain in effect until 1 July 2013.

As the bill was debated by lawmakers, masked demonstrators blew horns and shouted the name of Quebec Premier Jean Charest.

At one point, people went on to a motorway, moving between stopped cars. There was a heavy police presence accompanying the activists.

'Democracy's darkest days'

The law does not back away from rising tuition fees. But it closes universities for the summer before the end of the current semester, allowing them to re-open earlier in August.

The bill bans demonstrations within 50m (165ft) of university buildings. Student leaders blocking access to university buildings could be fined as much as $35,000 (£22,000), while student groups face penalties of up to $125,000.

Under the law, student groups are liable to pay for damage to property during protests and could find their funding cut.

The law also regulates protests more tightly, requiring itineraries to be submitted eight hours ahead of time.

Opposition leader Pauline Marois from the Parti Quebecois called for Mr Charest to hold elections because of the law's unpopularity. Ms Marois said Friday was "one of the darkest days of Quebec democracy".

Mr Charest must call an election before 2013.

Gabriel Nadeau-Dubois, spokesman for Classe, a student group, called the law the "murder of the right to demonstrate", and said Classe would challenge it in court.

The city of Montreal has meanwhile approved a by-law banning the wearing of masks during protests.

"It's time to reclaim our streets, our neighbourhoods, our cities," Montreal Mayor Gerald Tremblay said.

On Wednesday, protesters marched through a Montreal university, breaking up classes that had resumed that day.

The government has proposed raising tuition rates by 80% over seven years, or a hike of $254 per year. Quebec has the lowest tuition rates in Canada.