The whale was one of a group of about 30 seen off the city's harbour entrance in recent days.
Marine wildlife experts have expressed concerns for the other members of the pod who they fear may also strand.
Six years ago, 15 pilot whales died in a north Highland sea loch when a pod of 60 became stranded at Durness.
A pilot whale stranded on the shoreline near Inverness has been put down by a vet.