When several Samsung Galaxy Note 7 smartphones spontaneously exploded in August, the South Korean company went into overdrive. It urged hundreds of employees to quickly diagnose the problem.

None were able to get a phone to explode. Samsung’s engineers, on a tight deadline, initially concluded the defect was caused by faulty batteries from one of the company’s suppliers. Samsung, which announced a recall of the Note 7 devices in September, decided to continue shipping new Galaxy Note 7s containing batteries from a different supplier.

The solution failed. Reports soon surfaced that some of the replacement devices were blowing up too. Company engineers went back to the drawing board, according to a person briefed on the test process who spoke on the condition of anonymity because the internal workings were confidential. As of this week, Samsung’s testers were still unable to reproduce the explosions.

By then, it was too late. On Tuesday, Samsung said it was killing the Galaxy Note 7 entirely. The drastic move is highly unusual in the technology industry, where companies tend to keep trying to improve a product rather than pull it altogether. And it caps a nearly two-month fall for Samsung, which has taken a beating from investors, safety regulators and consumers over its trustworthiness — especially with a marquee product that was supposed to rival Apple’s iPhone.