Gorton said the differences between the way the two sides operate is significantly narrower than defendants had argued.

US District Judge Nathaniel M. Gorton pressed city officials on their decision to impose one set of regulations on traditional taxi companies and another on the up-and-coming transportation network companies, or TNCs, showing sympathy to the cabs’ claim that their equal protection rights had been violated.

A federal judge Thursday gave Mayor Martin J. Walsh’s administration six months to revise the way it regulates taxis and ride-hailing firms such as Uber and Lyft, part of an ongoing legal and political battle still shaping the way the two industries operate.


“They are both ‘hackney carriages’ as the term is defined by” a Boston Police Department regulation governing taxicabs, the judge wrote.

The taxi and livery industry quickly claimed that Thursday’s ruling represented a legal victory.

“The decision that the judge made with respect to whether or not TNCs are different from taxis because they are tech companies or use an app, he basically threw those claims out the window,” said Jenifer Pinkham, an attorney representing the Boston Taxi Owners Association and two Boston taxi license owners, who brought the case.

A Walsh spokeswoman said Thursday the administration was “reviewing the decision.”

The judge dismissed several counts, including ones against Police Commissioner William B. Evans and state officials, citing legislative progress on measures to change the way the state regulates the two industries.

Uber spokeswoman Carlie Waibel said in an e-mail, “We are pleased to see the bulk of these meritless claims were dismissed.”

Gorton instructed the city “on or before” Sept. 30 to tell the court what regulatory changes it intends to make and to argue why the court should not force city officials to regulate TNCs the way they do taxis.

Governor Charlie Baker entered the fight last year, filing a bill that he said balanced innovation and public safety. The House passed a refined version in early March that would increase state supervision and require new government background checks for drivers at the ride-hailing companies. The state Senate is expected to take up its own proposal this year.


Gorton acknowledged one dilemma that is facing policymakers on all sides of the high-stakes fight, writing that the question of whether the two types of firms should be treated similarly “is not easily disentangled and is subject to reassessment as the transportation industry evolves apace.”

As both Boston and Massachusetts work to market the business climate as welcoming to tech firms, the politics of regulating such businesses have grown more complicated.

The newer transportation firms have argued that imposing new regulations on them would discourage the growth of the area’s tech economy. The older companies say the current set of policies leaves them at a stark competitive disadvantage.

Scott Solombrino, spokesman for a coalition of taxi and livery industry members, said in an e-mail, “We applaud the court’s decision today in recognizing what we have known all along — that the city of Boston has the authority to regulate Uber and Lyft and should be taking action to level the playing field between these companies and the law abiding taxi and livery industries.”

Gorton noted that evolutions in the taxi industry, like app-based taxi requests and credit-card payment systems, have brought the two types of ride services more closely in line.


That interpretation appears to conflict with the ride-hailing companies’ contention that they should be regulated not as part of the transportation industry, but as part of the technology sector.

Jim O’Sullivan can be reached at jim.osullivan@globe.com. Follow him on Twitter @JOSreports.