AUGUSTA, Maine – Attorney General Janet T. Mills has sued Volkswagen and its affiliates Audi and Porsche and their American subsidiaries over the German automakers’ sale of diesel cars fitted with devices that concealed illegal amounts of harmful emissions.

The lawsuit, announced Friday, was filed last month in Kennebec County Superior Court, according to a press release.

About 3,500 of the diesel automobiles were sold in Maine, Mills said in the release. Volkswagen and the other companies misled regulators and the public about the emissions, the complaint alleged.

Mills joined other states and the federal government in an investigation into the German car maker in September 2015.

“We will not tolerate the flouting of our state’s environmental laws, the legacy of Sens. Ed Muskie and George Mitchell,” Mills said in the press release. “We will enforce Maine’s environmental standards and will not allow offenders to view serious violations of law as some sort of cost-of-doing-business when they get caught.

“Our air, water and natural resources and the health of our people are more important than a corporation’s bottom line,” she said. “We will seek substantial penalties from the Volkswagen companies for these serious violations.”

This suit follows the car companies’ partial settlements of federal claims for consumer relief and consumer deception penalties, as well as their agreement to establish a fund to mitigate the environmental damage caused by their admitted misconduct. Those earlier settlements did not resolve any of the claims for civil penalties that Maine and other states, as well as the Environmental Protection Agency, may bring for the companies’ violations of state and federal environmental laws and regulations.

The state is seeking unspecified civil penalties, legal fees and costs and an injunction to prevent the automakers from sending cars outfitted with such devices to Maine dealers again.

The complaint alleges that:

— The three affiliated brands Volkswagen, Audi and Porsche made a knowing decision to violate the laws of Maine and other states not just once, but repeatedly, with different types of defeat devices that cheated on emissions tests.

— Starting with model year 2009, Volkswagen and Audi, and later Porsche, began installing these defeat devices in several generations of U.S.-market Volkswagen and Audi diesel engines that equipped over a dozen models, including flagship Audi luxury sedans and high-performance Porsche SUVs, with sales eventually totaling about 3,500 vehicles in Maine.

— The defeat devices took the form of computer software designed to ensure that a vehicle’s emissions system performed properly only during emissions testing. On the road, the defeat device switched off or scaled back the vehicles’ emissions systems, with the result that the cars and SUVs emitted nitrogen oxides — a harmful pollutant linked to numerous respiratory diseases — far above allowable limits, indeed up to 40 times those limits.

— As a result of use of the illegal defeat devices, thousands of excess tons of nitrogen oxides are estimated to have been illegally emitted into the air in the U.S., building up harmful ozone in the atmosphere and contributing to increased respiratory health problems and diseases.