PHOENIX — A judge has rebuffed a bid by Volkswagen to have a federal court handle the claim that it violated Arizona consumer protection laws.

U.S. District Judge Roslyn Silver said the state’s case is based on the contention that the German automaker knowingly and intentionally deceived Arizonans into buying diesel cars that were supposed to produce less emissions. The company has admitted the engines burn dirtier than claimed, she noted.

That means it is legally irrelevant, Silver said, whether VW violated federal clean air standards. She said the only issue is whether VW lied to Arizonans, and that does not require a federal court to decide.

The ruling represents a significant victory for Attorney General Mark Brnovich, who originally filed the case in state court. It provides what might be called a “home field” advantage to have a state judge determine the extent of Arizona’s consumer fraud laws. The lawsuit seeks at least $40 million from VW.

In her ruling, Silver said VW set out in 2007 to become the world’s largest automaker, requiring it to “dramatically increase” its U.S. sales.

“Volkswagen believed it could do so by placing special emphasis on the development and sale of what it called its ‘Clean Diesel’ vehicle,” Silver wrote.

She said they generally are more fuel-efficient than gasoline-powered engines but sometimes cannot meet stringent U.S. emissions standards. The company made some progress toward a technical solution. “But, in 2008, it determined there was an easier way: cheating,” she wrote.

In essence, VW designed its diesel engines to sense when they were being tested, reducing power and lowering emissions. Then, off the test device, power went back up — along with emissions.

The state’s case, she said, is based on the claim that between 2008 and 2014, VW “inundated consumers in Arizona with commercials regarding its Clean Diesel vehicles.”

It was not until 2015 VW admitted to federal and California officials it had installed the “defeat devices” in the vehicles.

Brnovich filed suit earlier this year claiming VW “engaged in deceptive and unfair business practices,” and that state consumer fraud laws were violated in the “advertising, marketing, selling and leasing” of the vehicles.

VW had the case transferred to federal court, arguing there were federal issues that only a federal court could resolve. Key to that, company attorneys said, is whether the state can prove its vehicles violated federal emissions standards.

Silver, however, wrote that, “Arizona could prevail on this (consumer fraud) claim even if it were to drop all mentions of federal law, regulations, and standards from its complaint and case strategy. In fact, Arizona could prevail even if the federal law, regulations, and standards had never existed.”

She said the state consumer fraud laws require only a showing that a company’s statements “had the tendency and capacity to convey misleading impressions.”

That makes the case all about what VW said to customers and potential customers, not about whether what was coming out of tailpipes violated federal emission standards, Silver said.

In the lawsuit, Brnovich said potentially 4,000 Arizonans were effectively duped into buying vehicles with a special diesel engine that was advertised as having just a fraction of the emissions as similar cars. Buyers paid anywhere from $1,000 to $7,000 more than for comparable vehicles, he said.