It took BMW AG more than two years to discover the extent of a braking system fault that is expected to cost the carmaker nearly €1 billion ($1.1 billion) to fix.

Customers and dealers began complaining to the German auto manufacturer about faulty brakes in June 2022, according to a recall document seen by Bloomberg News. But it wasn’t until last month that BMW realized as many as 1.5 million cars might contain the defective part, supplied by car-parts maker Continental AG and touted as a lighter and more efficient system.

A profit warning last week wiped €5 billion off BMW’s value, a debacle for a premium-car maker known as a driving-tech leader.