A state judge has slammed the door on a legal challenge by opponents of Uber, clearing the way for the rideshare giant to run traditional taxis off the road.

In a decision unveiled Wednesday, Queens Supreme Court Justice Allan Weiss ruled that for-hire vehicles could use electronic hails to compete with yellow cabs—something they have been doing well enough to threaten the existence of the iconic 80-year-old industry.

If that means yellow-cab medallions worth a collective $10 billion or so just two years ago become worthless, the judge suggested, so be it.

“Any expectation that the medallion would function as a shield against the rapid technological advances of the modern world would not have been reasonable,” he wrote. “In this day and age, even with public utilities, investors must always be wary of new forms of competition arising from technological developments.”

The plaintiffs, led by four Queens credit unions who lent heavily to medallion buyers, plan to appeal.

“In the meantime, however, a catastrophe is unfolding, as an entire industry continues to be illegally destroyed, while elected officials allow it to happen on their watch,” their lawyer Todd Higgins said in a statement that apparently referred to defendants Mayor Bill de Blasio and Attorney General Eric Schneiderman. “It is a stunning abdication of leadership and responsibility that will haunt New York City for years to come.”

The “catastrophe” he cited is the possible slew of loan defaults in the coming months if owners stop making payments on medallions that have plunged in value since peaking at more than $1 million and don’t generate enough income for the borrowers to repay their debts. No medallions have been sold since February, when two went for $700,000 each. A wave of foreclosure auctions could reveal that the market now considers medallions to be worth substantially less, which could trigger more defaults and auctions—a so-called death spiral.

Judge Weiss made clear that that’s not his concern. “It is not the court’s function to adjust the competing political and economic interests disturbed by the introduction of Uber-type apps,” he wrote.

Uber was not a defendant in the lawsuit, which sought to compel the city’s Taxi and Limousine Commission and the attorney general to stop livery cars from scooping up passengers who hail them from the street using smartphones. But the de Blasio administration defended Uber’s interests by arguing that e-hails are pre-arranged travel, which does not require a taxi medallion. The judge said it was regulators' right to make that determination, and that e-hails are not the same as street hails made by lifting one's arm or whistling.

Taxi and Limousine Commission Chairwoman Meera Joshi said, “This decision is a victory for the riding public, and leaves no question as to the appropriateness of our regulatory approach to app-dispatched services. Passengers will remain free to continue to enjoy the many transportation options available to them."

Earlier this summer, Uber had fought with the commission and Mr. de Blasio over their proposal to cap rideshare companies' growth in the city while a study of their effect on traffic was conducted. The plan was tabled by the City Council after a public-relations blitz by Uber and the company's agreement to turn over trip data the administration wanted.

Uber's e-hail app reached the city in 2011, but it was in mid 2014 that the company took off, heavily recruiting drivers and flooding the streets with 20,000 vehicles that could respond to Manhattan smartphone hails within two minutes. Taxi revenues began to sag, and some of the 13,000-plus yellow cabs sat idle for entire shifts for lack of drivers.

Melrose Credit Union, which has 78% of its loan portfolio tied to medallions, and three other lenders filed their suit in May and sought an injunction to stop Uber, arguing that they would suffer irreparable harm if nothing was done while the case proceeded. The case was combined with two other lawsuits from medallion owners, taxi drivers, leasing agents and other yellow-cab interests. The ruling was far worse than they expected: not only no injunction, but outright dismissal of the case.

"We are pleased that the court found that the city has acted appropriately in its regulatory approach to this technological innovation—electronic apps for dispatch in the for hire vehicles—which are separate and distinct from traditional street hails," said Michelle Goldberg-Cahn, the city lawyer who handled the case, in a statement.

Unless the suit is reinstated on appeal, the plaintiffs’ predictions of doom will be tested. Taxi trips and revenues have dipped but not plummeted, and medallion values could stabilize in the way that the housing market did after the 2008 crash. Yellow cabs have a new, exclusive app of their own called Arro, which their owners hope will catch on. Even Uber executives have said repeatedly that there will always be a place for yellow cabs in New York City.

But with technology shortening waits for liveries and black cars, and the cost of entry being so much less for yellow cabs’ rivals, medallion owners might have to continue reducing the price of leasing their cabs in order to attract drivers. Only a few years ago, competition to drive taxis was so intense that drivers sometimes bribed leasing agents for the right to rent cabs while also paying the maximum lease rate allowed by city regulators. Now so many taxis are idle that some garages don’t have room for them all, prompting complaints from nearby residents about cabs hogging street parking.