The top cab medallion lender had almost $400 million in delinquencies and troubled debt restructuring at the end of July, according to a letter sent to the city released Wednesday.

It is a huge increase from when Melrose Credit Union had only $32,000 in delinquent loans in January 2014, says the letter to the city's corporation counsel.

It was also significantly worse than the end of May this year, when delinquencies and troubled debt were about $316 million.

"To put it bluntly, the imminent risk of cascading medallion foreclosures, followed by the collapse of the medallion market, and by extension the entire taxicab industry, is no longer a threatened harm -- it is a reality that is already unfolding," writes the group's lawyer Todd Higgins.

The credit union is suing the Taxi and Limousine Commission and the city because it says Uber rides are not pre-arranged trips, but illegal electronic hails. State law gives yellow cabs the exclusive right to street hails.

The average number of yellow cab trips a day fell 15.5% between April in 2012 and 2015 -- about 80,000 daily rides, according to the Taxi and Limousine Commission.

The letter also asks for the law department to remove the corporation Counsel's lawyer Michelle Goldberg-Cahn from the case accusing her of switching the city's argument on apps that solicit cabs.

Goldberg-Cahn said in a sworn affirmation in 2013 that trips in car service apps are hails, the letter states. In August this year, she said in court that the city had argued then that electronic hails were a form of pre-arranged trip, the letter says. Higgins said these were "blatant misrepresentations" and that she should be taken off the case.

She responded with a letter that said the allegations were meritless, and that the statements Higgins was referencing were not the city's complete argument.

"I did not make any misrepresentations or misstatements of fact to this court as to the city's prior arguments, deliberate or otherwise," Goldberg-CahnĀ wrote.