DETROIT â€" The South Korean carmakers Hyundai and Kia built their brands around the idea that their cars got better gas mileage than competitors, promoting that fact in ads that often took swipes at less efficient rivals.

But on Friday, the companies admitted that they had overstated the fuel economy of 900,000 vehicles sold in the United States over the last two years â€" about one-third of the vehicles they sold during that period.

Hyundai and Kia, which are both owned by the Hyundai Motor Group, said they would begin a broad effort to reimburse consumers and restate mileage estimates for the affected models.

The admission followed an investigation by the Environmental Protection Agency into consumer complaints that their cars were underperforming the official mileage estimates on the window stickers of new Hyundai and Kia vehicles. While few drivers achieve the stickered mileage levels under real-world conditions, the government requires automakers to conduct standardized tests to calculate the figures so that buyers can more easily compare the fuel efficiency of various models.

Hyundai and Kia apologized to customers for what they called “procedural errors” in testing that resulted in incorrect mileage stickers on some of their most popular models, like the Hyundai Elantra and Kia Rio.

It is a costly setback for the companies, which are among the fastest-growing carmakers in the United States and self-proclaimed leaders in the highly competitive area of fuel economy.

“Given the importance of fuel efficiency to all of us, we’re extremely sorry about these errors,” said John Krafcik, the chief executive of Hyundai’s American operations.

The E.P.A. did not announce any sanctions or fines against either carmaker, and said both companies agreed to voluntarily lower fuel estimates on a majority of their new cars and S.U.V.’s.

“Consumers rely on the window sticker to help make informed choices about the cars they buy,” said Gina McCarthy, an agency official. “E.P.A.’s investigation will help protect consumers and ensure a level playing field among automakers.”

Hyundai and Kia now face a protracted struggle to restore their reputations.

“In an industry where reputation is so important, this will undoubtedly give both carmakers ugly black eyes,” said John O’Dell, an analyst at the auto research firm Edmunds.com.

To compensate customers who bought cars with the inaccurate stickers, the companies will offer debit cards to reimburse them for the difference between the stated gas mileage and the actual amount of gas used in their vehicles.

The companies said their dealers would check vehicle odometers to see how much more customers spent on gas than they would have if the window stickers had been accurate. That amount, in addition to a 15 percent “inconvenience” bonus, will then be refunded.

The company estimated that the average debit card will be for about $88, based on a typical car driven 15,000 miles this year that had an overstated fuel economy of 1 mile per gallon. Current owners will be able to refresh the card as long as they own the vehicle.

Mr. Krafcik declined to estimate the total cost of the program, which could run into the tens of millions of dollars. “We’re going to spend what it takes to make it right,” he said.

The companies will also replace mileage stickers on large numbers of unsold cars, and run newspaper ads explaining the mistakes and reaffirming their commitment to delivering good fuel economy.

The E.P.A. said it discovered the mileage discrepancies during a continuing fuel-economy audit program that covers vehicles made by various manufacturers.

The agency said it was aware of consumer complaints about Hyundai mileage estimates when its audit found a difference in the stated and actual fuel economy mileage of an Elantra sedan. The E.P.A. then expanded its testing to other Kia and Hyundai models.

The agency said its investigation was continuing.

“Although it took more than a year, the E.P.A. did catch the discrepancies,” Mr. O’Dell said.

The companies said the misstated mileage figures were a result of internal errors in testing the vehicles for E.P.A. certification.

The government has standard testing procedures it requires all automakers to use to produce mileage estimates, which can then be displayed on cars for sale in dealer showrooms.

The tests measure aerodynamic drag on vehicles, how much energy is used to overcome road resistance and the amount of fuel used to drive the engine and wheels.

In the case of Hyundai and Kia, errors in testing caused inaccurate mileage estimates that were one to six miles per gallon higher than the vehicles were capable of. The companies gave no explanation for the wide band of errors.

The corrective actions agreed to by the carmakers will have an immediate effect on their marketing efforts.

The fleet average of all Hyundai and Kia models combined will be reduced by 3 percent, to 26 miles per gallon from 27. Also, Hyundai will retract widely publicized claims that four of its models get 40 miles per gallon on the highway.

Mr. O’Dell of Edmunds said that falling out of the 40 m.p.g. category could hurt sales, particularly when competitors are also advertising that figure as a new benchmark for fuel economy.

The E.P.A. said that it had twice before required manufacturers to relabel a vehicle’s fuel economy since 2000, but that this was the first instance where multiple models from the same carmaker had overstated mileage estimates.