A woman who became marooned on a sandbank, and a coastguard who went to her aid, both had to be rescued off the north-east Fife coast.
Two lifeboats and another coastguard were in a race against time to save the stranded pair as the incoming tide rose in the River Eden estuary north of St Andrews.
The drama happened at lunchtime when the woman, who was walking on the beach at the north of the West Sands, realised she was becoming trapped by the rising water.
She called Fife police and they alerted Aberdeen Coastguard and the coastguard officers at St Andrews, the RNLI at Broughty Ferry and a Royal Navy helicopter from Prestwick.
The lifeboats and two coastguard officers from the St Andrews station were first on the scene and saw the woman was in some distress.
The inshore lifeboat moved towards her as one of the coastguard officers waded out. The lifeboat crew reached her first and lifted her to safety, but the drama was not over.
The coastguard officer who had waded out realised he was in peril and needed help. His colleague on land saw the danger and threw him a rope. He tied it to his body and he was then pulled ashore.
The woman was taken to a safer area of the coastline and, relieved that her ordeal was over, stepped on to dry land.
Broughty Ferry RNLI operations manager Dave Martin said: “If people are out walking they should be aware of the tide times to prevent being caught out and cut off by the quickly rising tide.”
His warning was echoed by a spokesman for Aberdeen Coastguard.
He said: “This is apopular spot for walkers.
“The tide does come in quickly and people do get caught out sometimes. If people are going walking around the Eden Estuary and West Sands they should make themselves aware of the tide times.
“They can contact us at Aberdeen Coastguard if they require the times.”
Many people have had to be rescued from the sands in the past.
The spokesman said there had been at least one other person cut off by a rising tide since Christmas.