Uber has been told its self-driving cars are illegal - but it is refusing to take them off San Francisco's roads.

The company started testing the vehicles this week, but the Department of Motor Vehicles (DMV) has said the firm must have a test permit.

Uber said it did not need one as they have a safety driver at the wheel, and is going to ignore the demand.

California’s attorney general – the state’s most senior government lawyer – said Uber must cease the driving immediately or face further action.

A spokeswoman for the attorney general’s office would not be drawn on what the specific action could be, but the next step would likely be a court order compelling Uber to carry out the demand.

‘Illegal’

Other companies testing autonomous technology in California, such as Google, have applied for and obtained the permit which costs $150 (£120) for 10 vehicles.

Additional vehicles can be added at a rate of $50 for each additional 10 vehicles.

“It is illegal for the company to operate its self-driving vehicles on public roads until it receives an autonomous vehicle testing permit,” said Brian Soublet from the California DMV in a letter to Uber this week.

In a conference call with media on Friday, Uber’s vice-president of Advanced Technologies Anthony Levandowski said Uber had “respect” for officials, but that the regulations were irrelevant to its cars.

“You don’t need a belt and suspenders if you’re wearing a dress,” he told reporters.

In his view the permit only applies to cars that could operate “without the active physical control or monitoring of a human operator”.

Uber’s cars need a human, he said – although the company still intends to refer to the vehicles as “self-driving cars”.

The Tesla defence

He went on to make a comparison with electric car company Tesla. Its cars come with a feature known as Autopilot which takes control of the vehicle and automatically keeps up with traffic and changes lanes.

Autopilot does not require a permit, and so Uber argued its cars should be treated the same way. It requested clarification from the DMV on that issue specifically.

Google cars have a human driver behind the wheel at all times.

The permit requires companies to cover insurance costs as well as provide public reports on any collisions or instances when the human driver must take control.

Uber said it planned to make disclosures about the performance of its cars, but did not specify how.

On Friday afternoon, a number of the cars were seen travelling around the city.

Earlier in the week one of the cars was filmed jumping a red light, an incident Uber blamed on human error.