Apple is apologizing to users and lowering the cost of replacement batteries after it admitted it intentionally slowed down older iPhones to prevent unexpected shutdowns.

The tech company issued a statement Thursday announcing it would lower the price of replacing an out-of-warranty battery on iPhones 6 or later-- from $79 to $29.

Apple clarified its intentions in slowing down the devices and said it never meant to shorten the lifespan of any product.

"First and foremost, we have never — and would never — do anything to intentionally shorten the life of any Apple product, or degrade the user experience to drive customer upgrades," Apple said.

"Our goal has always been to create products that our customers love, and making iPhones last as long as possible is an important part of that," it said.

Apple said in the statement it initially thought the problems were caused by temporary lags and bugs after updating operating systems, but later attributed them to battery performance.

It explained that performance wanes as batteries chemically age, are recharged and exposed to hot or cold temperatures. Older batteries are occasionally unable to deliver necessary energy loads, sometimes causing the device to shut down, it said.

The company's confirmation of a long-suspected phenomenon triggered class-action, breach-of-contract lawsuits.

Apple also said it will release a software update in early 2018 that will allow users to better understand the health of their iPhone's battery.