SAN FRANCISCO (KPIX 5) — While taxi medallions in San Francisco were once seen as a good investment — literally a license to make money for cab drivers — the popularity of ride-sharing apps has led to a looming financial meltdown for the city’s struggling taxi industry.

The rise of Uber and Lyft as the more common way for people to catch rides around San Francisco has left local cab drivers deep in debt.

READ MORE: California Background Check System Snafus Delay Elder Care Hiring

And San Francisco could be on the hook for the money owed as the taxi medallion market descends into a financial disaster.

“25 years I’ve done this job. I’ve complied with all the rules and regulations,” said SF taxi cab driver Chris French. “I’m just trying to make an honest living.”

Take a ride with French and you’ll hear an increasingly familiar story.

“I went ahead and I bought a medallion, and like I said, it just keeps getting worse,” explained French.

Taxi medallions are something cab drivers and the city have wrestled over since the 1970s.

That’s because those medallions were the only way to drive a cab in the city. Their restricted number literally drove demand for taxis and the medallions themselves.

Some drivers spent 10, 15 or even 20 years on a waiting list, just for a chance to buy one for upwards of $20,000 to $25,000.

Flash forward to the late 2000s when San Francisco faced two problems: a shortage of cabs on the street and a $50 million budget shortfall at the SFMTA.

“Really the only directions I received from the powers that be at the time were to sell medallions,” said Christiane Hayashi, former Director of the SFMTA Taxi Program

Hayashi, who is now retired, was asked to restructure the medallion system in 2008.

“I think SF was looking at the New York medallion system and seeing that there was a tremendous amount of revenue they were not taking advantage of at the time,” said Hayashi.

So the plan was to turn demand for medallions into a money maker for the city. But the high cost of a taxi medallion at $250,000 — the price of a house in a normal real estate market – meant the city needed a lending partner that could issue medallion loans.

Officials found one just two blocks away from City Hall.

“So I looked at it. I looked at the financing. SF Federal Credit Union was doing the financing,” remembered French. “$1,000 a month. I made the payment, I have $1,500 left over for myself. That seemed like a good deal so I went for it.”

Initially, drivers bought medallions, the city made millions of dollars in transfer fees and the credit union was collecting interest on those loans.

Only something else was happening at the very same moment.

Just as the city finalized the taxi medallion program, ridesharing provided by drivers working for Uber and Lyft started disrupting the taxi industry.

Years later, with those two apps serving as one of the main ways residents and visitors get around the city, the taxi industry is more than disrupted; its crippled.

In cabs across San Francisco, taxi medallions have turned into something like a troubled mortgage.

“So, that’s still not enough to make my rent and the loan payment,” said French. “So I’m giving up. Maybe I can keep up with my loan payments and hold on to the medallion until they can sell it.”

READ MORE: Family Clings To Hope That Missing San Francisco Toddler Arianna Fitts Is Still Alive

The last time SFMTA sold a taxi medallion?

“They haven’t sold a medallion in a year,” guessed French.

Actually, the last sale dates back to April of 2016.

“What its worth?” asked French. “It’s really questionable.”

If there isn’t a line of people waiting to pay $250,000 for a taxi medallion, it begs the questions: Does the system work?

“Clearly not,” said Hayashi.

But now there is an even larger problem brewing: the San Francisco Federal Credit Union’s taxi medallion portfolio.

“I’ve heard, anecdotally, that some people who have bought medallions are walking away from their loans,” said Hayashi.

KPIX 5 has learned that the San Francisco Federal Credit Union has now foreclosed on 70 medallion loans – and it considers the remaining loans — approximately 480 of them — as “impaired.”

The Credit Union has also filed a legal claim against San Francisco as stakeholders increasingly blame the SFMTA for a medallion market that fell apart when tens of thousands of drivers without taxi medallion were allowed to hit city streets.

“The city should give us our money back,” said French.

“The taxi drivers told us at the time, ‘Why aren’t you enforcing the laws against these illegal market participants?'” admitted Hayashi.

When asked if he felt like the city undercut him, French replied, “Yeah, I feel like they stabbed me in the back.”

So the questions moving forward will be who is responsible for sorting out this mess and who is responsible for that medallion debt?

“Ultimately, the city owns those medallions,” said French.

So what was originally a plan to fill a budget hole at the SFMTA is now at the center of a legal claim against the city, tied to $125 million worth of troubled loans at a local credit union.

There is also a second complaint filed against the city by the Medallion Buyers Alliance complete with six pages full of claimant names.

While the SFMTA has hired a consultant to try to make some sense of this financial fiasco, for the moment, the city does not have any solid answers as to how it will solve the taxi medallion problem.

The mayor’s office declined to comment on the issue Monday, as it is now a legal matter.

But in the complaints, you can already read the arguments in the case against the city.

The SFMTA sold the medallions and were responsible for enforcing the city’s taxi regulations, yet they failed to stop an obvious threat to the medallion economy.

MORE NEWS: Ballpark Beating Victim Bryan Stow Tosses Out Giants First Pitch

The expensive mess also touches on politics and possibly a legal review of San Francisco’s relationship with ridesharing companies that upended the taxi industry.