– Hours after Uber began offering people in San Francisco rides in self-driving cars Wednesday, California regulators told the ride-hailing company to stop and said it could face legal action if it does not get a state permit.

Uber started a public pilot program in the morning, and by midafternoon, the California Department of Motor Vehicles sent the company a letter saying the service was illegal until it got a permit required for putting autonomous vehicles on public roads.

Uber knew about the requirement but argued that its cars do not meet the state’s definition of an “autonomous vehicle” because it requires a person behind the wheel to monitor and intervene if needed.

Making the distinction on the definition of an autonomous vehicle is in line with Uber’s history of testing legal boundaries.

Although the company has been around less than a decade, it has argued with authorities in California and around the world about how much of its drivers’ histories should be covered in background checks and whether those drivers should be treated as contractors ineligible for employee benefits.

“If Uber does not confirm immediately that it will stop its launch and seek a testing permit, DMV will initiate legal action,” DMV Chief Counsel Brian Soublet wrote.

He did not specify what that might entail but referenced the possibility of taking Uber to court.

Uber did not immediately respond to a request for comment, so it was unclear if it stopped the service.

Its hometown launch earlier in the day expanded a deployment of self-driving cars it started in Pittsburgh in September.

The testing allows everyday people to experience the cars as Uber works to identify glitches before expanding the technology’s use in San Francisco and elsewhere.

It deployed a “handful” of Volvo luxury SUVs — the company wouldn’t release an exact number — that have been tricked out with sensors so they can steer, accelerate and brake, and even decide to change lanes.

The cars have an Uber employee behind the wheel to take over should the technology fail. Users of the app may be matched with a self-driving car but can opt out if they prefer a human driver. Self-driven rides cost the same as ordinary ones.