A large explosion rocked a Foxconn factory in southwestern China that local media have linked to Apple iPad 2 production, killing at least two people, the Wall Street Journal reported.

The Taiwanese company, Apple Inc's main contract manufacturer for gadgets from the popular tablet to the iPhone, operates the plant in a high-tech industrial zone west of Chengdu, the capital of Sichuan province, the Journal said.

An Apple spokesman was not immediately available for comment.

Two were killed and 16 injured by the explosion, but the government has ruled out foul play, the newspaper cited the Chengdu government as saying in a statement.

Foxconn, the world's largest contract manufacturer and an affiliate of Taiwan's Hon Hai, made headlines last year after reports emerged about poor working conditions at factories in southern China, which critics say may have helped drive several employees to suicide.

The company has pledged to improve employee welfare.

According to the Journal, the factory in Chengdu had some responsibility for making the iPad 2, Apple's latest version of the dominant tablet computer on the market.

Shares of Apple were down 0.8 percent at $337.70 in early afternoon trading.

(Reporting by Poornima Gupta; Editing by Lisa Von Ahn)