Kansas City government officials are going to court to try to halt the Lyft ride-sharing service from operating in the city.

The city attorney’s office has filed a motion for a temporary restraining order to prevent Lyft from dispatching or operating vehicles for hire. A hearing is scheduled for Tuesday afternoon in Jackson County Circuit Court.

The legal filing follows several days in which representatives of the city and the company held negotiations that did not result in an accord on how the company can comply with city regulations.

The city argues that Lyft is a third-party transportation company that is covered by city code. It says the company and its drivers have failed to pass through the normal screening and certification process to ensure their qualifications for carrying passengers. Nor have they paid the required license taxes for their business activities.

Lyft’s actions “put the general public in the city of Kansas City, Missouri, at an immediate risk of harm because of their continuing unlawful operations,” the city’s filing states. It alleges that on at least two occasions, Lyft drivers seriously jeopardized public safety while attempting to flee from investigators.

Lyft’s local attorney, Pat McInerny, declined to comment, but the company issued a written statement that said it will continue working with local officials to find a solution that prioritizes public safety.

The company maintains that it has a different business model and shouldn’t be subject to standard municipal taxicab rules. It uses a smartphone app to match passengers with drivers and says those motorists don’t charge fares but calculate “suggested donations.” The company pitches itself as an easy and affordable alternative to summoning a cab.

The company also says that it does rigorous background checks and vehicle inspections and maintains ample liability insurance.

“The people of Kansas City deserve access to the same modern and safe transportation options that are available in metropolitan centers across the country,” the statement said. “Residents have embraced Lyft’s peer-to-peer model as a fun and reliable alternative that expands consumer choice and increases safety by going above and beyond what is required by existing transportation services.”

Kansas City spokesman Chris Hernandez has said that the city wouldn’t just trust restaurants to police themselves and also won’t do that for ride-sharing services. He said as long as Lyft, UberX and other such services will comply with a few reasonable rules and pay their licensing fees, they can then operate legally in Kansas City.