A cleanup is underway in northern Belgium after a train carrying chemicals derailed and burst into flames.

The fire set off a series of explosions as six of the 13 cars derailed around 2 a.m. Saturday, 20 kilometres east of the city of Ghent.

The accident, between the towns of Schellebelle and Wetteren, prompted officials to warn residents in the area to close their doors and windows. About 300 people ended up leaving their homes.

Two people who lived alongside the track are dead, but it is unclear how they died. Another 14 were injured.

Amateur video showed the train ablaze at night. After sunrise, the train cars could be seen forming a zig-zag over the track.

"It was carrying a variety of chemicals and toxic raw materials at the time, with at least one of the carriages reportedly carrying cyanide," said CBC's Dominic Valitis, reporting from London.

The train was travelling from the Netherlands to Ghent's seaport.

With files from The Associated Press