How will the ridesharing companies react to California’s new regulations? Ask Austin.

The problem:

Uber, Lyft, and the places where they operate still can’t quite agree on how to regulate the companies’ relationship with their thousands of employees — sorry, the independent contractors whose cars, time, and energy make the companies run.

Uber has also spent hundreds of millions on marketing to get out from under the #DeleteUber campaign after the company incentivized drivers to work during taxi boycotts after Trump’s travel ban; 14 women just filed a case against Lyft claiming they were sexually assaulted by drivers; and both are pouring tens of millions of dollars into supporting a ballot initiative in California to carve out a special form of non-employment for drivers to help them avoid paying benefits and the minimum wage.

Despite the companies’ efforts, California’s state legislature passed a bill this month forcing companies like Uber and Lyft to reclassify their contractors as employees. Uber, thumbing its nose at lawmakers, said that it would continue its current model of having drivers be independent contractors. Uber’s “usual course of business,” Uber’s chief legal officer Tony West said in press statement, is “serving as a technology platform for several different types of digital marketplaces,” in which the drivers do not participate. This would seem to directly conflict with the California law’s text and intention — the law’s supporters specifically said it was meant to target “gig economy” companies like the ridesharing services.

At the core of nearly all these controversies is how the companies’ relationship with their drivers should be regulated. As West told the media this month, Uber is “no stranger to legal battles.”

Uber and Lyft today are more likely to pour money into lobbying and marketing to get their way, but in Austin, Texas, in 2016, they tried that, and when it didn’t work, they just picked up and left town.

Four years ago, Austin lawmakers introduced a package of rules and regulations affecting Lyft and Uber that would, most significantly, require fingerprinting for their drivers for safety reasons. The companies claimed that this was an unnecessary precaution that would disrupt their ability to sign up new drivers. The two companies spent more than $8 million in a campaign over a single, confusingly worded 2016 ballot question on background checks and other regulations.

While far worse PR would soon be coming, the fight over whether drivers in Austin should have to get fingerprinted captured the attention of the national and even international media. The city that’s as well known for its strong sense of distinctive local identity as it is for its yearly tech-and-culture-fest South By Southwest became a notable holdout to the global spread of these ride-hailing giants.

While Lyft and Uber were then experiencing skyrocketing growth, they had also run into regulatory friction in several cities all over the world. When New York City attempted to cap the number of Uber vehicles in 2015 due to concerns about congestion, Uber launched a ferocious political campaign to defeat it, including a feature in the Uber app called “de Blasio view” that would show extremely long wait times for vehicles, implying that that would become a reality if Mayor Bill de Blasio got his way. (Three years later, New York City was able to institute the cap.)

Uber was also effectively banned from the tony New York beach town of East Hampton and its surroundings in 2015 before a state law let them back in 2017, while ride-hailing apps were only legally allowed in Alaska starting in 2017 after Uber left amid a labor dispute three years earlier.

But Austin’s attempt to regulate Lyft and Uber would ultimately have a nationwide impact on how both companies operate today.

How the policy worked:

In May 2016, just days after Austin voters rejected a change to the city council’s ride-hail rules, Uber and Lyft left Austin.

“On the driver side, it really sucked because they were caught in the middle,” said Harry Campbell, the founder of the Rideshare Guy, a website and podcast devoted to the industry. While most people in Austin were able to make do with their pre-Lyft-and-Uber options, of the drivers, he said, “One day they had a job, and one day they didn’t.”

Drivers began flocking to a Facebook group called Arcade City Austin, which was started by the creators of a fledgling ride-hailing app. Passengers would post where they wanted to go in the group and drivers, most of whom had previously worked for Uber or Lyft, would reply, creating an ad hoc ride-hailing system. Drivers would also post screenshots of their Uber or Lyft profiles as a clunky form of background checking, essentially substituting the system that Austin voters had found wanting.

“It was extremely illegal,” Campbell said.

Austin is a car-based city: About three-quarters of Austin-area commuters travel by themselves in cars, and the area’s transit system, Capital Metro, has just under 100,000“boardings” per day, in a combined metro area of over 2 million, with just under 1 million in Austin itself. “Tourists rely on [ride-hailing apps] because they land in an airport without a car and don’t know their way around the city,” said Kara Kockelman, a civil engineering professor at the University of Texas at Austin. “Residents don’t have much of a problem because they don’t have a problem finding other modes. A huge portion was by private car or other mode.”

More legitimate operators rushed into the breach, including Fasten, an established Boston-based ride-hailing company. There was also RideAustin, a nonprofit founded by local entrepreneurs that charged a fixed fee per ride similar to Fasten and gave the rest of the fare to drivers, a stark difference from Uber and Lyft’s notoriously opaque system for split payments between themselves and drivers.

While Austin had definitively rejected Uber and Lyft, the artisanal ride-hailing renaissance showed that there was still an appetite for something beyond the existing taxi system. “Life finds a way,” Campbell said.

Austin residents who used ride-hailing services since 2014, before the ban, responded to it by using private cars or one of these alternative services, according to research by a group of scholars at the University of Michigan, Columbia, and Texas A&M based on a survey of more than 1,800 former Uber and Lyft riders in the November and December following the May 2016 vote.

“Most respondents switched to either a personal vehicle including sharing personal cars with friends (45 percent) or another transportation network company (41 percent) post- disruption. Interestingly, after the disruption, only 2.9 percent of people took the reference trip via public transit,” the researchers wrote.

Almost 9 percent said they had or were considering buying a car to account for the disruption in ride-hailing services. Researchers observed “a decrease in the average service satisfaction level post-disruption,” and there was a perception Lyft and Uber were higher quality compared to the alternatives that existed afterward, according to the survey.

While some conservative and libertarian media outlets and advocacy organizations claimed that Uber and Lyft’s departure led to an increase in drunk driving incidents, data analysis done by the Austin-American Statesman newspaper showed that driving-while-impaired arrests continued to fall, as they had been since 2012. Looking at data from the six months after the companies left compared to the same period in previous years, the Statesman concluded, “The data showed the number of people charged with driving while intoxicated was the lowest it has been in six years.”

But the most substantial effect may have been politically on the rest of the state. Other Texas cities had already scuffled with Uber and Lyft over driver fingerprinting. Lyft left Houston in 2014 while Uber left San Antonio briefly in 2015, eventually working out a deal with the city.

After the Austin vote, Uber and Lyft stopped operations in Austin and decided to move their fight from the city council to the Texas statehouse, pressuring the legislature to move authority for ride-hailing from the municipal level — which had traditionally regulated transportation like taxis — to the state level.

The companies showered money and manpower on the capitol, hiring dozens of lobbyists and spending hundreds of thousands of dollars. In just the first half of 2017, Uber spent somewhere between $820,000 and $1.6 million while Lyft spent between $365,000 and $760,000 in Texas, according to calculations done by the National Employment Law Project and the Partnership for Working Families.

Texas Gov. Greg Abbott (R) signed the new state ride-hailing law in May and Uber and Lyft returned soon after. “Texas has for a long time been the home for innovation and economic growth, but a patchwork quilt of compliance complexities are forcing businesses out of the Lone Star State,” Abbott said. The bill established licensing for the companies at the state level, including background checks that did not require fingerprinting.

Uber and RideAustin did not respond to Vox’s request for comment.

“They went to the statehouse to get a more favorable response” Rebecca Jones, director of work structures at the National Employment Law Project, told Vox. “In part because at that time state legislators were less familiar with how the companies operate and they were much more susceptible to this is bright and shiny and new and if they opposed it they would be [considered] Luddites.”

It set a national precedent. There are now more than 40 similar statewide laws that take power away from municipal lawmakers and protect the ride-hailing industry, making it easier for the companies to establish themselves all over the country and standardize their operations.

But lobbying efforts aside, data shows that while Austin voters may have voted in the ban because they wanted their own ride-hailing policy — or at least to stick it to large out-of-state companies — they also wanted to ride Ubers and Lyfts.

The competitors couldn’t survive once the ban was lifted. Fasten’s ride volume dropped 16 percent, the company told Curbed, after Lyft and Uber returned. RideAustin, according to data from RideAustin co-founder Andy Tryba, saw a volume drop of “55 percent in 1 week,” from almost 59,000 to just over 26,000, he wrote. “It’s hard to argue that the impact to the current local incumbents (including RideAustin) wasn’t swift and significant.”

Fasten would be shut down and sold off to a Russian technology company early last yearwhile another upstart company, Fare, left Austin soon after Uber and Lyft returned.

While Uber and Lyft did some discounting, Tryba wrote, the deals were “nothing terribly significant,” Tryba wrote. “Despite local ‘anger’ on how Uber/Lyft left the city previously or the troubles Uber has internally — that didn’t seem to matter a whole lot.”

”Since coming back to Austin, Lyft has provided affordable and reliable transportation for riders, a flexible earning opportunity for drivers, and boosted economic growth for businesses and organizations throughout Austin,” a Lyft spokesperson said in an emailed statement. “We look forward to continuing to partner with the businesses, lawmakers, and the City of Austin.”

The ride-hailing industry, now solidly a duopoly in Austin and across much of the US, hasn’t stopped its fight in state capitols for favorable regulations. The two companies are planning to spend more than $60 million, the Los Angeles Times reported, on a ballot initiative on something even more existential than background checks and fingerprints: a special, non-employee classification for their drivers in California.

They haven’t escaped their reputation problems entirely. Uber and Lyft are now publicly traded companies that are still reporting billions worth of losses and have seen their stock prices decline since their initial public offerings.

But they’ll be competing to turn themselves into profitable enterprises in a legal landscape largely to their liking. “Uber and Lyft were not messing around about getting their way about regulation,” Campbell said.