Several years after revolutionizing the American transportation landscape, Uber and Lyft are finally able legally to operate just about everywhere, thanks to the New York legislature’s decision to open up the entire state to Transportation Network Companies (or “TNCs”).

Long Island and Upstate New York were quite literally the last regions in America where residents were excluded from using these services — even Alaska had ridesharing before Albany. You’d think the arrival of new transportation options would be a cause for celebration, but some local governments would love to ban TNCs once again.

Most state TNC laws forbid local regulation, for good reason. Many cities that have enacted their own ridesharing regulations, such as Philadelphia and Las Vegas, and metro regions such as Tampa Bay in Florida have explicitly tried to keep TNCs out.

New York, which allows large cities and counties the choice to opt-out of the state’s TNC law and effectively re-ban ridesharing, offers several recent examples. Westchester County nearly banned TNC’s just days before the state allowed them. And Nassau County hasn’t banned them, but local taxi companies have lobbied hard against their competition.

Despite taxi industry opposition, ridesharing enjoys widespread support across New York — an April 2017 Siena College Research Institute poll found that at least 72 percent of respondents in every region were in favor of it.

So why are some local governments against it? The reason might be “regulatory capture”—the counter-intuitive phenomenon where regulations serve the companies they regulate rather than the public interest.

This often happens when companies have disproportionate input into how the rules are written. A majority of Nassau County’s Taxi & Limousine Board members work in the taxi industry and the chairman owns multiple local taxicab companies. In Philadelphia and Tampa Bay, regulators explicitly partnered with local taxi companies to influence state regulations and catch ridesharing drivers in sting operations.

My research with Chris Koopman and Matthew Mitchell at the Mercatus Center suggests taxi regulation is rife with regulatory capture. Proponents often argue that the regulation in question is needed for public safety, such as the insistence that drivers go through fingerprint-based FBI background checks. However, requirements like these can double as a roundabout way to raise their rivals’ costs. It’s essentially weaponizing regulation to keep out competitors.

In fact, the amazing growth of ridesharing is clear evidence that previous taxi regulations inhibited people’s access to transportation by blocking out entrepreneurs. The flood of new providers has led to less drunk driving and more service in poorer neighborhoods and for senior citizens.

Ridesharing has even forced taxis to clean up their act. In Chicago customer complaints about taxis substantially declined after the entrance of Uber and Lyft. Taxi drivers were quite clear that it was the new competition with ridesharing that motivated them to provide better service.

Safety has improved as well, because TNCs use technology that identifies both the passenger and driver. This solves the anonymity problem that was the original rationale for strict taxi licensing laws. If a driver or passenger commits a crime, they’re almost certain to be identified and caught, which severely diminishes the likelihood of any crime occurring in the first place.

In comparison, fingerprint-based FBI background checks are a high-cost and obsolete solution to the anonymity problem. They can screen out harmless drivers who have been arrested but never convicted of any crime. Requiring these checks risks institutionalizing bias, because some demographic groups are more likely to have been arrested but not have actual criminal records.

In short, ridesharing has taught us that the best path forward is to rethink taxi regulations. Unfortunately, New York proves that local regulatory capture may still be problem. As a result, there’s good reason for state legislatures to consider following Michigan’s example and create a single statewide regulation for taxis and limos, in addition to TNCs.

Regulatory capture may have ruled local taxi regulations for more than 100 years, but we face a unique opportunity to finally get them right.