A man who ventured on to a crumbling Moray breakwater to fish had to be rescued after becoming stranded by the incoming tide in the dark.
Coastguard and lifeboat crews were called to the seafront at Lossiemouth to bring the stricken angler ashore.
Last night, the RNLI said he was “lucky to be alive”.
The man, who is thought to be local and in his 20s, was fishing with two friends when he decided to cast his line from the end of the derelict defence that separates the mouth of the River Lossie from the town’s East Beach.
It is understood that rising tides prevented him from making it back across the sea wall.
His cohorts, who had remained at the nearby harbour, raised the alarm at about 10.30pm on Monday when they realised the man had been cut adrift by the sea.
Coastguard teams from Lossiemouth and Burghead arrived on the scene, and a lifeboat was called from Buckie.
RNLI volunteers had to use flares to light their way as they carried out the rescue effort, and eventually managed to retrieve the man from the dilapidated barrier.
He was brought ashore in a dinghy and reunited with his friends shortly after 11pm.
A Buckie RNLI spokesman said: “We can’t overemphasise the potential there was here for a tragedy.
“Where the men were fishing was near the mouth of the river, and had the casualty ended up in the water it’s highly likely the current would’ve swept him out into the Moray Firth.
“The consequences could well have been extremely grave.”
The chairman of Lossiemouth Community Council, Mike Mulholland, said the breakwater had been badly damaged by decades of stormy weather.
And he said that attempting to fish from it during the hours of darkness was a “foolhardy” decision.
Mr Mulholland added: “It is in need of repair and has been for quite some time.
“I’ve seen people out fishing on it quite a lot, but always in daylight.
“Going out there in the dark is a bit foolhardy, there are breaks in the structure that would make it difficult to get your footing at night.”
An inspection last year revealed that replacing the structure – which is meant to protect homes in the Seatown area from flooding – would likely cost £1.5million to £2million.