New York (CNN Business) Fiat Chrysler agreed to a $40 million fine to settle charges that it lied to investors for years about how many cars it was selling.

The cooking of sales figures took place between 2012 and 2016 with the help of a database of unreported sales known internally as the "cookie jar," according to a statement Friday from the Securities and Exchange Commission.

The automaker did not admit to or deny any wrongdoing as part of the settlement. But the SEC says Fiat Chrysler falsely claimed that it had a prolonged period of sales growth when the streak of sales gains it was bragging about each month was a myth.

"The SEC's order finds that [Fiat Chrysler] inflated new vehicle sales results by paying dealers to report fake vehicle sales," said the agency. It said that automaker also maintained a database of actual sales that it did not publicly report.

"In months when the growth streak would have ended or when [Fiat Chrysler] fell short of other targets, [Fiat Chrysler] dipped into the 'cookie jar' and reported old sales as if they had just occurred."

Read More