SAN FRANCISCO (AP) — Apple is banning the use of two potentially hazardous chemicals in the final assembly of iPhones and iPads as part of the company's latest commitment to protect factory workers who build its trendy devices.

The decision announced Wednesday comes five months after the activist groups China Labor Watch and Green America launched a petition drive calling on Apple Inc. to abandon the use of benzene and n-hexane in the production of iPhones.

Apple says a four-month investigation at 22 factories found no evidence that benzene and n-hexane was endangering the roughly 500,000 people who work at the plants.

The Cupertino, California company nevertheless decided the substances should no longer be allowed during the final assembly process.

Benzene can cause leukemia and n-hexane has been linked to nerve damage.