A watching brief was kept on what were believed to be sperm whales in the Forth.
The whales were spotted off the coast of Kinghorn around 12pm on Tuesday and remained in the area for two to three hours before moving out to sea.
It is rare to spot the massive species so far up the Firth of Forth and some watchers believe one of them may be sick or injured, possibly entangled in creel.
British Divers Marine Life Rescue kept an eye on the situation throughout the afternoon and planned to launch a boat.
A spokeswoman said there may have been up to three whales.
It was initially thought they may be humpback whales which, like sperm whales, grow to over 50ft long and tend to swim in deeper water.
The spokeswoman said: “We are pretty sure they are sperm whales, but we don’t know how many there are, there may be as many as three.
“We have someone watching from the shore and we are going to go out to have a look around. They have moved out to deeper water now.”
She said it was a concern that sperm whales were so far up the Forth but that they were moving in the right direction.
People were warned to stay away from the mammals to avoid causing them further distress.
“We don’t want people to go out in boats to see them as it could push them in the wrong direction.”
Ronnie Mackie, of Kinghorn, spotted the mammals from his house and watched them from the shore for a couple of hours.
He said: “It is unusual to see bigger whales this far up the Forth. We think there may have been two of them and one looked like it was in distress.
“It didn’t seem to be staying up in the water and it looked like the other one was trying to keep it up.
“When I first saw it I wondered if it might be tied up in creel, but I’m not certain of that. We didn’t see them roll over as they normally would.
“They were pushing upstream but then they were pulled by the current out to sea.”
Sperm whales are more frequently spotted in deeper water around the north and west of Scotland but three years ago a pod of 14 were spotted near the Firth of Forth.
In May last year a pod of six killer whales was seen near the Isle of May.