Samsung has permanently halted production and sales of its Galaxy Note 7 smartphone after failing to correct a problem that was causing the devices to burst into flames.

The loss of one of its flagship smartphones is a major embarrassment for Samsung (SSNLF), which was forced to recall 2.5 million Note 7s shortly after the device went on sale in August.

The South Korean firm attempted to fix the problem by switching battery suppliers and updating the smartphone's software. Company executives issued a slew of apologies.

But when replacement phones were issued, a number of customers reported that those devices also caught fire, including one aboard a passenger jet.

Samsung on Monday advised all customers to stop using the phones, sending its shares tumbling by 8% in Seoul. The world's biggest smartphone maker said Tuesday it was killing off the phone entirely.

Related: The Galaxy Note 7 is a $10 billion problem for Samsung

The Note 7 was a premium device that sold for at least $850 in the United States. It received strong reviews from critics, who heralded it as sleek and powerful. But customer excitement soon evaporated as safety concerns grew.

Samsung was panned for its response to the crisis -- many customers were confused over whether their phone was safe, whether it should be returned and whether the electronics giant was offering a replacement.

Samsung told customers in South Korea on Tuesday that they will be able to exchange their Note 7 for another smartphone. The exchange program will begin on Thursday and run through the end of the year.

It was not immediately clear what customers in other markets could expect in terms of a replacement or compensation.

Giving up on the Note 7 will be costly. Analysts at Nomura estimate the total hit could reach $9.5 billion in lost sales and wipe out $5.1 billion of profit.

But Samsung, which has a market value of about $194 billion and annual sales of $179 billion, should be big and profitable enough to weather the loss of one model.

-- Jethro Mullen contributed reporting.