A Manhattan Supreme Court judge rejected ride-hail giant Lyft’s challenge to city rules that effectively set a minimum wage for New York’s for-hire drivers.

“This is a victory for the hardworking drivers of New York City, who have been taken advantage of by these companies for far too long,” said Mayor Bill de Blasio in a statement.

Judge Andrea Masley summarily dismissed Lyft’s arguments in a 19-page decision released Wednesday.

The Taxi and Limousine Commission established the rule — which aims to ensure drivers make an average $17.22 an hour after expenses — in the wake of the City Council passing a sweeping set of laws in 2018 to better regulate the business.

City lawmakers also put a yearlong cap on the number of ride-hail drivers that Uber and Lyft could add.

The new rules came as a flood of ride-hail cars caused cabbie earnings to plummet — leading to a spate of driver suicides — and slashed the value of once highly desirable cab medallions.

But Lyft claimed in a statement the TLC’s rules are what’s really hurting drivers.

“The TLC’s rules have hurt earning opportunities for drivers, and will diminish competition that benefits drivers and riders,” spokeswoman Madeline Kaye wrote.