MONTREAL -- Uber is now officially allowed to operate in Quebec.

The Quebec government passed new taxi legislation late Thursday, days before before Uber's pilot project in the province was due to expire. 

The new legislation, Bill 17, regulates ride-sharing services like Uber, mandating, among other things, that Uber drivers complete additional training and pass an exam. 

Fifty-five MNAs voted in favor of the bill. Thirty-nine voted against.

Taxi drivers demonstrated earlier Thursday against the bill. They say it will unfairly punish Taxi drivers. 

The Association des Taxis des Regions du Quebec (ATRQ) spearheaded protests to push back against the CAQ government's reform of the industry.

Taxi drivers across the province protested the taxi reform bill (An Act respecting remunerated passenger transportation by automobile) all day, the biggest action taking place outside the National Assembly.

Drivers also lined up in front of the Laval Palais de Justice to draw attention to their cause.

Premier Francois Legault had threatened to close the government to force the adoption of the bill before the Uber pilot project expired next week.

Legault said his government is offering a generous compensation package for medallions to drive taxis. The government is spending $800 million to buy them back. 

The permits were previously required to drive a taxi in the province. Drivers bought and sold them, sometimes for hundreds of thousands of dollars. The arrival of ride sharing systems significantly reduced their market value, leaving many drivers, who rely on the sale of their medallions as a retirement investment, severely in debt.

"It doesn't make sense," Legault said of the high price of taxi medallions. "Of course, it started at $10-20,000 a year, and now it's $200,000, but what's important is that our government is ready to repay 100 per cent of the cost. If somebody paid $200,00, we'll pay back $200,000 to those people."

With files from The Canadian Press first published Oct. 10, 2019.