Uber drivers have tried to use the courts to gain the right to unionize. Now the ridehailing company is flipping the script and suing the city of Seattle after it passed a law allowing gig economy drivers to form unions.

The suit calls into question a law passed unanimously by the Seattle city council. The rule gave drivers for Uber and Lyft and other ridesharing services the right to organize and collectively bargain for improvements to their working conditions, earnings and benefits.

The measure was brought forward by the App-Based Drivers Association, and was challenged initially by the United States Chamber of Commerce. That suit, backed but not brought directly by Uber, was tossed from court because the rules had yet to be implemented and the results of it weren’t evident yet.

The rules finally went into place in December 2016, and Uber almost immediately took legal action in response. The ridehailing company claims Seattle “failed to provide comprehensive rules and disregarded the facts and circumstances of drivers and the industry” and asked for a suspension of the rules.

According to Uber, the lawmaking process was flawed and denied proper feedback from the public and Uber drivers in the city and believes the right to collectively bargain for better wages and benefits is inconsistent with the economics of the for-hire transportation industry.

The city of Seattle has officially filed its response to the suit through the court, defending what it calls a “first-of-its-kind law seeking to empower independent contractors.” The city’s attorney Peter Holmes argues in the response that Uber not only had time to respond to the rules, it commented on the proposals on multiple occasions.

“Uber must demonstrate both that it has no other readily available legal remedy and that it has standing to bring each of its claims. Uber cannot demonstrate either,” Holmes states in the brief.

The challenge from Uber comes at a difficult time for the company, which just came under considerable fire following an executive order signed by President Donald Trump that banned travel from seven majority-Muslim countries.

Uber CEO Travis Kalanick was a member of Trump’s economic advisory board and was forced to step down due to pressure from the public. Over 200,000 also reportedly deleted the ridehailing app from their phones after it appeared the company attempted to break up a taxi driver strike in New York City during protests against the travel ban.

The company also reportedly posted $800 million in losses during the third quarter of 2016 despite increasing its sales.