This is the shocking moment two rail workers narrowly avoided being hit by a train near Weston.

The incident, at Uphill Junction near Weston, occurred at around 1.10pm on January 14 as the workers cleared vegetation to the side of the track.

The Rail Accident Investigation Branch is looking into the incident.

A spokesperson said the train hit a tree during the incident, but that it had not derailed and no one was injured.

"The track workers involved were part of a team that was undertaking de-vegetation work on an embankment adjacent to two open running lines," they said.

"During this work, a tree of around 165mm (6.5 inches) in diameter, which had been felled by the team, came down the embankment and landed in the cess.

"The two track workers involved in the incident went onto the line and attempted to remove the tree from the cess.

"While doing so they unintentionally moved the tree so that it became foul of one of the running lines."

The track workers then became aware that a train was approaching them, they added.

"They were able to move clear of the line several seconds before the train passed them, but part of the tree remained foul of the line and was struck by the train," the spokesperson said.

"No injuries resulted from the collision. The train did not derail and sustained only minor damage.

"We have undertaken a preliminary examination into the circumstances surrounding this incident."

A further report into the incident will be released in the 'near future', they said.