Firefighters have released images of a delicate rescue operation at Greta in the Hunter Valley that took place earlier this week.
The incident happened at the rear of a home in Guy Close around 1.45pm on Tuesday.
A man was working with an excavator when it moved and pinned him to a retaining wall, with the tracks trapping him by the leg.
Fire and Rescue NSW crews from Branxton-Greta and Lambton joined NSW Ambulance paramedics and the NSW Rural Fire Service at the scene where they stabilised the patient.
The emergency crews hatched a plan to use an off-duty firefighter's four-wheel drive as an anchor point as they carefully raised the track using two hand winches and the 4x4 winch.
FRNSW technical rescue experts and paramedics safely extricated the man and he was transferred to hospital by the Toll Air Ambulance.