Uber is at the King’s gate!

Faced with intense competition from the ride-sharing app, Gene Friedman, the largest yellow cab medallion owner in the city, has filed for bankruptcy for part of his taxi empire, bankruptcy papers show.

The self proclaimed “King of Taxis” owns more than 900 medallions, and is seeking Chapter 11 protection for 22 companies that control a total of 46 medallions.

Citibank has sued Friedman for failing to pay back loans that he took out for some of his medallions. The cab czar claims that the Uber incursion has gutted their value that was once placed at $1.1 million in 2013.

Friedman’s move comes on the eve of a City Council vote that would cap the number of new vehicles from Uber and other similar companies.

Despite the bankruptcy filing, Friedman’s companies will continue to operate while restructuring, according to court papers.