A dumper truck driver working on the Borders Railway on the northern outskirts of Galashiels was airlifted to hospital after an accident on Tuesday.
His vehicle overturned just after 1pm after apparently striking a tree trunk.
The 44-year-old man from Tweedmouth was trapped for around 40 minutes and was freed by fire and rescue crews from Galashiels, Selkirk and Lauder using hydraulic gear.
Paramedics, police and a representative from main contractors BAM attended.
The driver sustained neck and back injuries and was taken to the Borders General Hospital by helicopter.
A spokesman for British Transport Police said: “Our enquiries into the accident continue.”