A fisherman was rescued Monday from the cliffside perch where he hid during a harrowing encounter with 50 aggressive grey seals on a Scottish beach, officials said.

The Maritime and Coastguard Agency on Monday said the fisherman, who was not identified, was walking on a beach in southeastern Scotland late last week when he came across the group of seals and their young pups -- who quickly became agitated and aggressive.

To escape, the fisherman started climbing up the face of a cliff, but he soon found himself trapped and unable to reach the top. The fisherman, however, had a cell phone handy and called for help.

The fisherman climbed up a cliff after encountering a colony of seals and their pups, but got stuck before making it to the top. (Maritime and Coastguard Agency)

Coast Guard rescue teams from four locations responded and used rope rescue techniques to safely extract the man from the cliff and into a lifeboat waiting below. The man was then taken to safety in Eyemouth harbor.

Officials said the man was treated for exposure to the cold but was otherwise uninjured.

“Anyone who encounters a seal or colony of seals on the beach or coastline is advised to move away at the first sign of agitation,” coast guard officer Jonathan Mustard said in a statement. “Aggressive seals are not a common occurrence and in this case, they may have been protecting or defending their natural habitat and their young.”