Vanessa was driving through downtown Los Angeles last summer when she spotted a woman waving her arms. She pulled over and asked, "Are you OK?"

The woman said she needed a ride. She looked worried, Vanessa said, like something was about to happen to her or had happened, but she was afraid to say what.

Vanessa thought she could help if the woman downloaded the Uber or Lyft app – she drives for both companies. But then the woman pulled out an old flip phone.

The woman offered cash instead. Vanessa reluctantly agreed to give her a ride without the app. That's when cops pulled up, patted Vanessa down and placed her in handcuffs. It was a sting.

For years, the Los Angeles Police Department has set up these stings to catch so-called "bandit taxi drivers." Police describe these bandits as people who illicitly pose as cab drivers, sidestepping regulators and taking cash fares.

That hardly fits the description of Uber and Lyft drivers, who are background checked and state regulated. But Uber and Lyft drivers are also prohibited under city law from accepting fares in cash, and they are increasingly being caught in bandit taxi stings.

The woman who flagged down Vanessa was an undercover cop working overtime with about a dozen other officers. The LAPD and Los Angeles Department of Transportation spend about $800,000 annually on these operations – all of it paid by the taxi cab industry.

So far this year, the LAPD has nabbed more than 200 ride share drivers in these stings, including Vanessa. KPCC is only using her first name because she fears the charge will prevent her from working.

"My intent was good," she said. "I was punished for good intent."

These undercover operations are a sore spot for Uber and Lyft drivers, who question the legality of the stings and the role of the taxi industry, which has opposed ride share companies operating in Los Angeles.

But Lt. Dave Ferry, head of traffic coordination for the LAPD, said the Bandit Taxi Enforcement Program is in no way meant to protect the interests of the taxi industry. Ride sharing drivers who agree to take cash are violating city law, Ferry said, and putting themselves at risk.

"A lot of the [ride share] people we are arresting - believe it or not - we are arresting for their own safety so they are not putting people in the cars that can hurt them," Ferry said.

'Straight bandit'

Ferry took over the stings for the LAPD a couple years ago and found officers are nabbing two very different types of drivers: professional taxi or ride share drivers who break the rules and illegal business operators who pose as drivers.

"This is the last detail that we worked. Looks like a taxi cab to you, yeah?" Ferry said, passing a printout picture across the table. The photo showed a mustard colored car with Independent Yellow Cab Co. slicked on the side.

"That cab is a straight bandit," he said.

The LAPD and LADOT conduct four to 10 stings per month to arrest drivers who violate the bandit taxi law. Mae Ryan/KPCC

These shady drivers buy old cabs at auction and paint them to fool the public. They'll leave business cards at corner liquor stores or taped to pay phones.

They can present safety risks. One unpermitted driver made headlines after he picked up passengers from a house party in Compton in 1999. He had two drunk driving convictions and a suspended license, and he apparently tried to beat a Blue Line train crossing when his car was struck. He and his five passengers were crushed to death.

Ferry's seen cases of theft and assault. Once he noticed something on the driver’s leg. The bandit taxi driver was wearing a GPS anklet.

"It was a sexual predator," Ferry said.

But today, these stings nab more Uber and Lyft drivers than shady imposters. LAPD records show that ride share drivers now make up the largest portion of the arrests.

Ferry said his stings aren't entangling innocent drivers. More of these ride sharing drivers illegally troll the city looking for cash fares, Ferry said, and he disputes Vanessa's claim that the undercover cop acted like the situation is urgent.

"I insist that everyone arrested, it’s a crime of intention," he said. "The folks know what they are doing is wrong. And we are not just getting people caught up in some ethical dilemma."

KPCC wanted to witness and document a sting in action, but the LAPD rescinded an invitation on the day of a scheduled sting. (Ferry said they didn’t see the upside of bringing in a reporter.)

Cash for enforcement

Bandit taxi enforcement ramped up in 2006 after The Board of Taxicab Commissioners hammered out a plan with the cab companies. The deal called for a $30 monthly fee imposed on each taxicab to raise money for the stings.

Elvin Galindo, an investigator at the Los Angeles Department of Transportation, said cabbies were tired of losing out on fares to drivers who sidestepped city regulations and fees.

"So the companies decided they wanted enforcement of these bandit taxis," he said.

But, city records show, the deal would only stand if the fee could ultimately be passed on to passengers. Fares hiked up 20 cents.

Uber and Lyft are cab companies biggest competitor, calling some to question the role of the taxi industry in funding LAPD stings. Justin Sullivan/Getty Images

Busting illegal cab businesses is one thing, but Uber and Lyft operate legally in California and are regulated by the California Public Utility Commission. The companies are also the biggest competitors of cabs. The Los Angeles Times found after ride sharing companies came to L.A. cab rides dropped off by nearly 30 percent.

Galindo insisted that it was not a conflict of interest for the City of Los Angeles to take money from the taxi companies to fund stings that now arrest their top competitors.

"If the Uber and Lyft drivers happen to do something illegal – there’s really no conflict of interest – they are on their own volition committing a crime," Galindo said.

Outside of the stings, it's unclear just how often Uber and Lyft drivers willfully accept cash and break city law and their company's rules.

At the ride share standby lot at LAX, a swarm of drivers idled in their cars, waiting for their app to connect them with passengers.

As Eddie Ouchi, an Uber driver, cleaned out his car he explained that some riders still don’t get how Uber and Lyft work. They’ve tried to hail him and offer cash. He's never gone for it.

"No. No way. I'll never take a risk," he said.

6 months in jail

Uber and Lyft drivers charged for a bandit taxi violation face a cascade of potential consequences.

Uber's website says drivers can be fired. But the company may not find out about Vanessa’s charge. The California DMV doesn't track these violations, KPCC found, so it won’t show up on a driving record.

Mostly, Vanessa feared the potential misdemeanor conviction blemishing her clean record and, worse, a maximum sentence of six months in Los Angeles County jail. When we met at the courthouse downtown, Vanessa had swapped out her ball cap for a blazer.

"I’m a little bit infuriated at our justice system this morning," she said.

Last year, 243 bandit taxi cases were filed by the Los Angeles city attorney. They include ride share drivers and other motorists caught in LAPD stings, including illegal businesses.

The persistent pursuit of misdemeanor charges is puzzling. Back in 2013, then City Attorney Mike Feuer joined the LAPD pledging to save cash by reducing first-time, low-level offenses to an infraction, which is like a ticket. The guidelines allow police and prosecutors to choose more serious charges for repeat offenders or as appropriate.

The downgrade list is long and includes window washing vehicles, skating in parks after sunset – and operating a taxi without a permit. The City Attorney's Office says the latter is a serious public safety issue that requires a tougher response.

"The public doesn't know if they have licenses," Feuer said. "Doesn't know what their safety record is like as drivers. Doesn't have background information about them. Doesn't know if they've gone through any screening."

Vanessa looked into getting a lawyer to fight the charge. A slew of attorneys advertise services for a bandit taxi defense by posting explainers on the code violation – 71.02(A) – and rising to the top of nervous offenders' Google searches.

One attorney quoted Vanessa $2,000, but the price was out of reach. The L.A. Department of Transportation impounded her car after the sting, and it cost her about $1,000 to spring it out.

"There was lost work wages there, too," she said. "That was a really rough patch. I took out a personal loan, and it still wasn’t enough."

In court, two men appeared before the judge on the same charge. Both had private attorneys, one of whom tapped on his phone throughout the hearing. The deputy city attorney immediately offered each man a plea deal: he'd reduce the charge if they admitted guilt.

Finally, Vanessa's case was called. She stepped up and the same deal appeared on the table. She took it, reluctantly. But, she was glad it was over. She rode the elevator down, took out her phone and opened her app to catch a ride home.