The two people killed were members of BASF's own fire service. One person is still missing and eight have been seriously injured in the blast, while a further six people were treated at BASF's emergency room and were able to return to work, BASF said.
"During work on a pipeline there was an explosion, which resulted in fires. The pipelines that burned included ones with ethylene and propylene product," the company said. The fire has now been extinguished, it said.
The BASF fire department and the Ludwigshafen fire department remain at the plant, performing "cooling and safety measures", BASF said.
The plant's 'steamcrackers' are shut down, and 20 other BASF plants are either shut down or only partially running, it said.
This is the second gas explosion to hit the town of Ludwigshafen, according to news site Deutsche Welle. An explosion two years ago, close to the BASF plant, killed one worker and injured 20 more, as well as damaging nearby houses, the news site said.
BASF recently reported above-estimated earnings in the third quarter, with an operating profit of €1.5 billion.