The main rail line between Sydney, Adelaide and Perth is blocked after a freight train derailed about 200 kilometres west of Broken Hill.

The Australian Rail Track Corporation says damage to the track has to be assessed before the route can reopen.

The South Australian Country Fire Service has put out a fire at the scene.

But authorities are now concerned about a leak from the front of the train.