Sometimes from tragedy comes a good marketing opportunity. In an effort to curb the number of unofficial and apparently unsafe iPhone chargers in use, tech giant Apple is discounting its own chargers from $19 to $10 when customers turn in their unauthorized power supply.

The move is being touted as a safety precaution after a pair of incidents in China involving third-party chargers that allegedly killed a woman a put one man in a coma. Many Apple customers turned to the third-party iPhone chargers because they're often a fraction of what the official ones cost.

"Recent reports have suggested that some counterfeit and third party adapters may not be designed properly and could result in safety issues," a statement on Apple's website says. "While not all third party adapters have an issue, we are announcing a USB Power Adapter Takeback Program to enable customers to acquire properly designed adapters."

Related: Apple to Investigate Alleged Death by iPhone

Apple didn't mention those specific incidents but the correlation is fairly clear. Within a week of the second shock, Apple created Chinese-language illustrations to help customers there identify official chargers.

For safety or not, the Adapter Takeback Program should generate tens of millions of dollars for Apple around the globe, but it's especially important from a customer relationship standpoint in China, where sales have tumbled amid public relations crises surrounding labor abuses and iPhone warranties.

This quarter, Apple's total sales in China, Taiwan and Hong Kong were $4.6 billion, down 43 percent from the previous quarter when Apple raked in $8.2 billion from the region. It accounts for more than 10 percent of Apple's global sales.

Earlier this year, chief executive Tim Cook demonstrated how important China is to Apple by going so far as to apologize to the entire nation for appearing "arrogant" in the face of customer complaints about warranty and repair policies.

The promotional trade-in program will run from Aug. 16 to Oct. 18. To get the new charger, customers must bring in their iPhone, iPod or iPad as well as the unofficial USB charger.

Related: Could Your Next iPhone Have a Larger Screen?