Boeing Co. learned that a cockpit warning light on its 737 MAX jetliner was defective in 2017 but decided to defer fixing it until 2020, U.S. lawmakers said on Friday.

The defective warning light alerts pilots when two sensors that measure the angle between the airflow and the wing disagree. Faulty "angle of attack" data is suspected of playing a role in two deadly crashes involving Boeing's best-selling 737 MAX in Indonesia in October and in Ethiopia in March.

Those crashes, which killed 346 people, have triggered investigations by aviation regulators and U.S. lawmakers and left Chicago-based Boeing facing one of the biggest crises in its more than 100-year history.