A deal was reached between Uber and the Quebec government early Thursday which allows the ride-hailing app to continue operating in the province during a one-year pilot project.

The agreement in principle was announced just after midnight by Transport Minister Laurent Lessard.

Lessard said in a statement that the company has agreed to make concessions to its business model in order to comply with Quebec laws and regulations.

He said the deal means there will be one type of permit for all drivers, though it wasn't immediately clear whether that means Uber drivers will have to have taxi permits.

Full details of the agreement were not disclosed.

Permits were a main sticking point in the negotiations. A new law aimed at regulating Uber, passed in June, would have forced Uber drivers to take out a taxi permit or risk fines up to $25,000. Uber has also agreed to pay taxes.

Uber Quebec general manager Jean-Nicolas Guillemette said the company decided to continue operating under the pilot project to give Quebecers "more options to get around town or use their car to earn income" and to show a willingness to work in a regulated industry and "be a partner in innovation."

"In the days to come, we'll have more to say about how this pilot project impacts riders and drivers,'' he added.

Down to the wire

Transport Minister Laurent Lessard says the deal was struck after midnight. (Jacques Boissinot/The Canadian Press)

The province agreed to delay the implementation of its new law by 90 days in order to give both sides time to figure out how Uber would conform to the new rules.

The deadline to come to that agreement was midnight Thursday, and the Uber app risked shutting down in Quebec if no deal could be reached.

Lessard said talks with the ride-hailing service were at a standstill for most of the day.

Without a deal, the province's automobile insurance board, la Société de l'assurance automobile du Québec,would begin to enforce the new law.

That would have meant not only seizing vehicles, as they do already, but also seizing drivers' licences and enforcing stricter fines.

Uber had issued a plea for support to all its users via email, asking them to tell the government why they support "ridesharing and innovation in Quebec" ahead of the looming deadline.

'Too big to be stopped'

Uber drivers Simon Rivest and Daniel Blais (left to right) both say they loved meeting new people through the ride-sharing app. (Simon Nakonechny/CBC)

Uber driver Simon Rivest said some drivers were considering moving to Ottawa or Toronto so they could keep operating their business.

He was confident Uber would come to an agreement with the province, eventually.

"Even if an agreement isn't reached tonight, in a few weeks it will be back," Rivest said. "Uber is too big to be stopped."

Driver Daniel Blais owns an ice cream shop and says he works for Uber for fun.

"After you try it, you love it," Blais said. "You get to meet people, get the story of their life in 15 minutes."

A tense night ending in celebration

In a last attempt to be heard, about a dozen Uber drivers held a protest at La Fontaine Park at 10 p.m. Wednesday night.

Rami Hamdi was at the protest and said it would be a very sad day if Uber ceased operating in the province.

Hamdi said he'd be willing to pay taxes on fares, especially since he said he earns more money being an Uber driver than he did at his previous job.

"Even if I paid tax I could still support my family and pay the bills," Hamdi told CBC News. "We're making good money."

When the group heard the agreement was reached, they celebrated.

"We are still on, thank God," Hamdi said.