TasRail operators were forced to deliberately derail an out-of-control driverless freight train in Devonport, sending it crashing through a fence with debris hitting two pedestrians.

Key points: TasRail alerted police it had lost control of a driverless train

TasRail alerted police it had lost control of a driverless train The freight train, carrying cement, was deliberately derailed at Devonport Wharf

The freight train, carrying cement, was deliberately derailed at Devonport Wharf Two people have minor injuries from debris after the train brought down a fence

The freight train carrying cement was diverted to a dead-end track and derailed across the river from the Spirit of Tasmania ferry berth shortly after 9:00am.

Parts of the derailed train slammed through a fence, with pieces of metal hitting two pedestrians. Both have been allowed to leave hospital following treatment.

Police were running and driving alongside the train as it careered along the tracks for more than nine minutes.

TasRail lost control of the train near Railton, about 20 kilometres out of Devonport.

It then continued rolling out of control, through Spreyton and across roads, before coming to a sudden halt on Formby Road.

Inspector Stuart Wilkinson said police warned of the approaching danger as the train travelled about 50 kilometres per hour (kph) towards Devonport.

"We had our police vehicles running alongside the train with lights and sirens going to try and alert people in the area that the train was heading their way," he said.

Devonport resident Len Dixon said the train appeared to be travelling about 70kph.

"[It was] running very quickly. [We] commented on the speed, and wondered how [it would] get [to its destination] if [it] didn't slow down," he said.

"This is the fastest [the train] has ever gone past us."

Pedestrians treated for minor injuries

A woman in her 20s was treated for minor head injuries after being hit by fencing material, which was scattered when the train hit a fence.

The engine and freight cars came to grief opposite the ferry terminal. ( ABC News: Henry Zwartz )

A second pedestrian — a man in his 40s — was treated for a broken elbow and cuts and abrasions.

Police said TasRail rang them about 9:00am to warn them that the train would have to be derailed near the Devonport Wharf area.

Devonport Police immediately sent every available vehicle and officer to the scene, and ambulance services arrived soon after.

Inspector Wilkinson said TasRail lost control of the train.

"The train was heading towards Devonport and it was necessary to notify residents in that area that the train was heading that way," he said.

"Obviously timing was critical … [and] it derailed about nine minutes after we were notified.

"Unfortunately two pedestrians walking on the walking track were injured. Tasmania Police was basically with the train as it derailed."

Derailment went to plan: TasRail

The train derailed on Formby Road, opposite the ferry link to the mainland, and the road is closed between Steele Street and Best Street until further notice.

TasRail chief executive Steve Dietrich said the cause was unclear.

He said the forced train derailment went to plan and the freight train could not have been derailed any sooner.

"This was probably the point in terms of being able to get the necessary personnel to site in order to safely bring the train to a stop," he said.

"We'll be providing a full investigation. It is very much a one-off, but very unfortunate set of circumstances, and we'll make sure everything in the future is put in place to prevent such an occurrence."

'Carriages jumping up in the air'

Two pedestrians were injured when the train derailed. ( Supplied: Sea FM Devonport )

A witness, Andrew, told commercial radio he was sitting at the traffic lights outside the post office when he saw the train going past.

"I said to my wife 'ah gee, that's moving' and next minute it was all locking up and the carriages all jumping up in the air," he told LA FM.

"Within 20 seconds I'd say there were emergency vehicles, travelling probably almost as fast as the train, following it."

Another witness, Chris, was at the mouth of the Mersey River about a kilometre away when he heard the sirens following the train.

"We heard an almighty bang, sounded like an explosion," he said.

"We looked down towards the cement silos and just saw a huge cloud of cement dust just going everywhere … it was just carnage. It was incredible to see."

Police are urging people to avoid the area.

The National Transport Authority is also investigating.