The goat was stranded on the top of Northburg Castle near Greencastle for four days.