TORONTO -- An Ontario judge has sided with the ride-hailing service Uber in its legal dispute with the City of Toronto.

The city sought a permanent injunction on the company's operations, arguing Uber is a taxi company and must abide by the city's regulations.

But Superior Court Judge Sean Dunphy dismissed the application, saying there is "no evidence" the company is operating as a taxi broker or that it breached city bylaws.

In his decision, Dunphy said the city's definition of a taxi brokerage as any service that connects passengers and drivers is too broad.

Such a definition "would capture any telephone carrier since they are in the business of connecting calls and some of the calls they connect are certainly to request a taxicab or limousine transportation," he said.

The judge also said the issue should not be resolved in court -- a point he raised last month during trial.

"Questions of what policy choices the city should make or how the regulatory environment ought to respond to mobile communications technology changes are political ones," he said.

Uber offers passengers various services through its online app, from taxi and limousine rides to rides with ordinary drivers through its cheaper UberX application.

The company has always argued it is a communications service that connects passengers and drivers, and thus isn't subject to the city's bylaws.

Uber says it is pleased by the ruling and hopes it paves the way for regulations around the service.

"Today's outcome is a great win for the 5,000 drivers who need this flexible earning opportunity to make a living, and the 300,000 riders who rely on them to move around our great city," Ian Black, general manager for Uber Canada, said in a statement.

"We are grateful for all the support we've received from Torontonians and will continue to work in their best interests."

Uber applied for a taxi brokerage licence through the city earlier this year, but didn't apply for a limousine licence.

Toronto Mayor John Tory has said new technologies such as Uber's are here to stay and the city must figure out a way to work with them.

Taxi drivers have been vocal in their opposition to Uber, and roughly 500 recently staged a noisy protest outside Toronto City Hall.