Emergency services rushed to a Fife port on Tuesday night following reports of a dog in distress in the water.
The coastguard, fire service and police attended the scene at Methil Docks after a black Labrador got stuck in a lock.
A spokesperson for the Scottish Fire and Rescue Service said they were called to the scene just before 9pm.
SFRS reported that they sent two appliances to the scene after the coastguard, launched from Kinghorn, struggled to get their boat through the narrow lock to rescue the distressed animal.
The fire service also reported that Police Scotland attended with a dog handler in attempt to save the dog.
As the emergency services continued their rescue attempt the dog managed to free itself from the water at around 9.15pm.