When San Francisco’s board of supervisors passed an ordinance in June putting Airbnb on the hook for users who advertise rentals without registering with the city, the mayor’s office warned of a “near-certain legal challenge.”

On Monday, Airbnb took San Francisco to federal court—the sharing company’s first ride as a plaintiff.