A court ruling this week could open the floodgates for Big ­Apple apartment dwellers to sublet via the controversial home-share website Airbnb.

The potentially precedent-setting ruling by a Manhattan Housing Court judge nixed the eviction of a Financial District resident who had been subletting her apartment through the San Francisco-based accommodations site — even though she admitted breaking New York City law.

Justice Jack Stoller’s Monday ruling means that Kimberly Freeman can stay in her rental apartment at 33 Gold St. because the city law that prohibits short-term sublets applies only to landlords.

The Multiple Dwelling Law is “generally aimed at the conduct of owners of property, not tenants,” Stoller wrote.

Previously, landlords operated under the assumption that tenants profiting off unlawful sublets was a “noncurable” offense, meaning renters could not right the wrong to dodge eviction.

Because Freeman was making a profit off her rental, she should be evicted, landlord Gold Street Properties had argued.

Yet Freeman won her case, even though she admitted to pulling in $200 a night from guests checking into her two-bedroom unit, while her $2,350-a-month rent worked out to about $77 a day.

She also acknowledged that her lease expressly prohibited her from the practice.

“The court does not find that the enactment of statues ­designed to prevent rental property from being used for hotel purposes prevents respondent from being able to cure such ­activity,” Stoller wrote.

Freeman’s lawyer, Kent ­Gubrud, said the decision could be a boost to the thousands of city residents who sublet via the popular short-stay website.

“This latest decision will likely be very important to many Airbnb hosts who wish to challenge evictions under similar circumstances,” Gubrud said.

The landlord’s attorney ­declined to comment.

But while the ruling, if taken as a precedent, bars landlords from evicting tenants for subletting via Airbnb, the judge also said that once a landlord tells renters to stop the practice, they must comply.

Stoller noted that Freeman yanked her listing from Airbnb a month after her landlord told her to stop posting it online last October.

Veteran Housing Court attorney John Gorman, who is not involved in the case, hailed the ruling as “good for tenants.

“It’s useful to make clear that a violation of the Multiple Dwelling Law and the anti-Airbnb rules is curable and that’s a good rule of law,” Gorman said.

But the ruling could have the unintended effect of spurring more people to break the law.

When one of Freeman’s neighbors learned of her victory, he said her Airbnb hosting was “pretty smart. You could probably cover your rent in a week.”

Airbnb spokesman Nick Papas said, “We’re pleased with this decision and we hope the rec­ords we provided helped.”