In what Airbnb is calling an "unprecedented step," the company is suing the city of San Francisco, challenging an ordinance the startup says violates legal protections for internet platforms and its free speech rights.

The new law that trigged the dispute requires home-owners to register their rental properties with the city, with companies like Airbnb on the hook for any unregistered hosts. Passed unanimously by the Board of Supervisors earlier this month, Airbnb could be charged $1,000 per day for every host that has failed to register.

"This is an unprecedented step for Airbnb, and one we do not take lightly," the company wrote in a blog post Monday. "Unfortunately, the rules do not work. There is broad agreement that the current registration process in the City is broken."

Beset by drastic housing shortages, San Francisco officials designed the rules in part to protect the city's existing housing stock. By limiting the number of days for a short term rental and introducing a registration process, city officials sought to address criticism that rental companies like Airbnb were exacerbating the housing crises by converting affordable homes into hostels.

"There is a need for policies that protect San Francisco’s housing stock and ensure the collection of hotel taxes," Airbnb wrote. But the company argues that for some of its hosts, the registration process is unworkable, describing the city's requirements as "confusing and ever-changing."

But David Campos, a member of the board of supervisors and a co-author of the new rental law dismissed Airbnb's opposition, arguing that the lawsuit proves Airbnb "believes it's above the law."

Campos told BuzzFeed News that thousands of Airbnb's San Francisco hosts remain unregistered. The rental law would simply enforce the rules that already exist, he said, placing responsibility on Airbnb.

"Finally we have a set of regulations that actually have teeth. And not surprisingly Airbnb is suing us because they really don't want enforcement," Campos said.

The rental law could force the company to absorb massive penalties or remove the listings from its platform when the rules kick in next month.

In its lawsuit, Airbnb claims San Francisco is at fault for violating what's known as the Communications Decency Act, a federal law that shields internet companies like YouTube, Twitter, and Yelp from being held responsible for the content posted by their users.