A dramatic rescue mission ensued after emergency services were alerted to the man who had fallen into the river at Eskbank Woods, Dalkeith at about 3.50am on Tuesday, July 20.
The fire service sent a rope rescue team to the scene and managed to pull the man to safety.
A witness at the scene said: “As I passed on way to work at 4.30am there were five fire engines, four ambulances and two RIB boat rescue teams.”
A Scottish Fire and Rescue Service spokesperson said: “We were alerted at 3.48am on Tuesday, July 20 to reports of a person in difficulty at Eskbank Woods, Dalkeith.
“Operations Control mobilised four appliances and a number of special resources, including rope rescue teams, to assist with the rescue of a man who had fallen down an embankment.
“The casualty was handed into the care of the Scottish Ambulance Service.
“Crews left after making the area safe.”