The animals ventured onto a treacherous outcrop on the Great Orme near Llandudno in North Wales, when two females came into season and were pursued by 18 billy goats. One kid goat was also stranded.
They were spotted on the unstable land near the sea, in an area known locally as Austin's Rock.
RSPCA inspectors feared they were at severe risk from high tides or starvation due to a lack of grazing and food supply.
The charity teamed-up with Conwy County Borough Council to come to the aid of the goats with an innovative rescue plan; they created a path of hay bales for the goats to climb back to safety - with funding provided jointly by the RSPCA and the local authority.
RSPCA inspectors Mike Pugh and Mark Roberts laid the path of bales and thankfully, all 21 stranded goats have now walked back to safety.
Inspector Pugh said: "These goats were in real trouble - and had a rescue plan not been hatched, they would either have starved or drowned. There was no grazing or palatable water and they were at risk from the tide at the next spring tide later this week.
"They got into trouble after two female goats came into season - and they were pursued by Billy goats ending up on an outcrop of rock and in real danger.
"We're so grateful to the local authority for their help with this operation, and delighted we have been able to help in what was an innovative rescue mission and a really good example of what can be achieved together for animal welfare.
"We made a tiered path of 50 hay bales, and gradually, the goats made their way back."
The inspectors said the charity's work with the local authority rangers was a great example of what can be achieved together for animal welfare, in what is the latest adventure of the local population of wild goats.
The famous Great Orme goat population has roamed wild in the local area for more than a century, and were originally a gift from Queen Victoria, who also as Monarch granted the RSPCA its 'Royal’ patronage in 1840. It is understood Lord Mostyn acquired a pair of goats from the Royal Herd and brought them to the Llandudno area; and the population grew steadily since.
During the pandemic lockdown they wandered through the deserted streets of the town centre.