Prosecutors in California are suing Toyota, claiming the Japanese carmaker sold hundreds of thousands of vehicles that it knew had defects.

The world’s largest carmaker has recalled millions of vehicles because of problems accelerating and braking.

Regulators have linked five deaths to crashes allegedly caused by accelerator problems and are investigating dozens of others.

The company said it had not been served with the lawsuit and would not comment.

Officials in Orange County, in southern California, claim Toyota knew of defects with the acceleration system in several models, but did not tell customers.

“We’ll be alleging in court, on behalf of the people of Orange County, that Toyota knowingly sold cars and trucks with defects that caused Toyotas to accelerate suddenly and uncontrollably,” said Orange County District Attorney Tony Rackauckas.

The company has been forced to recall six million vehicles in the US.

This is the latest of several dozen cases against Toyota that could cost it billions of dollars.

Toyota’s US headquarters are in California – that is why prosecutors say they can bring charges and it is thought to be the first such case based on US consumer protection laws.