Commissioners in Miami-Dade County, Florida voted 9-2 on Tuesday in favor of ordinances that legalize Uber and Lyft, two popular ridesharing apps. Ever since the two companies began operating in the area in 2014, their services had been technically illegal. Undercover code officers have impounded cars owned by Lyft drivers and slapped them with heavy fines. Members of the powerful taxi lobby have called for a “citizen’s arrest” of Lyft representatives and urged the county to “put the drivers in jail.” Together, the two firms have reportedly received about $4 million in fines imposed by the county.

But consumers still flocked to Uber and Lyft. Uber claims it has over 10,000 drivers operating in the county. By comparison, Miami-Dade has just 2,121 taxi medallions (i.e. a permit to operate a cab) and more than 4,500 licensed drivers.

Read More: New Mexico Legalizes Uber and Lyft

Facing increased competition, taxi medallion value has plunged.  As recently as 2012, a medallion fetched $431,000. But today, one medallion-owning family claims they could only receive $40,000 on the resale market.

Determined to be formally legalized, Uber and Lyft heavily lobbied for reform, earning support from the Greater Miami Convention and Visitors Bureau, the University of Miami and the Greater Miami Chamber of Commerce. Uber even targeted commissioners with TV ads.

The Miami Herald explains the reforms contained in the ordinances:

Following nine hours of public comments and debate, commissioners adopted legislation that also dismantles some of the county’s regulation of taxis and shifts screening of for-hire drivers from local regulators to the companies themselves. Taxi drivers will no longer have to undergo county customer-service training or government auto inspections, but will be required to offer the same kind of app-based hailing software that Uber and its smaller competitor, Lyft, rely on exclusively for selling rides.

The ridesharing companies also staved off calls for more red tape:

At the marathon session before the commission, Uber and Lyft lobbyists and their supporters on the commission beat back attempts to cap the number of vehicles they put in service, register all drivers with the county and mandate permanent decals identifying vehicles as part of a ride-hailing network.

“Our approach was not to have government insert itself into something that the public seems to want,” said Commissioner Esteban Bovo, who sponsored the ordinances.

If signed by the mayor, the new legislation will take effect 10 days after passage.