A nine-year-old boy was rescued after he climbed to top of the ruins of Sandal Castle, during a game of hide and seek.
Staff from the nearby Castle Cafe and members of the community rushed to help the youngster after noticing him "looking distressed" on the castle walls this morning.
And firefighters were called in to bring him down to safety.
Eyewitness Caroline Monk was walking her dog at the site with her mum when she spotted the boy.
She said: "We saw this little figure at the top, stood with his arms up in the air on this 20ft high ruin.
"The wind was really strong and we thought gosh, how dangerous, if he falls he could be seriously hurt."
Miss Monk said she shouted to the boy to see if he needed help, but was told a friend had run off to get his parents.
She said: "We walked around again. He had been up there some 30 minutes already on his own.
"It was absolutely freezing cold. We could see he was shivering."
She raised the alarm at the nearby Castle Cafe. Staff rushed outside with blankets for the boy and contacted the fire brigade to help get him down.
A spokeswoman for Wakefield Fire Station said the boy was rescued at around 12.20pm.
They said: "On arrival at the incident the crew were directed to one of the remaining castle walls, approximately 10 metres high.
"On top of this wall was a nine-year old-boy who had been playing hide and seek with his friends and climbed the wall as part of the game.
"The young boy could then not then climb down and was left on top of the wall for approximately 30 minutes before the fire service was called."
Firefighters encouraged and supported the boy, who they said was "very cold, shivering and upset", down the ladder to safety.
Miss Monk said: "People at the cafe gave all the firefighters a hot chocolate and one to the boy.
"Thank goodness the cafe was there and people were around otherwise I don't know what would have happened."
Wakefield Council, which last week unveiled proposals to restore the monument and carry out repairs to its bridges and walkways, said warning signs are present around the castle.
Karen Collins, Wakefield Council’s Service Director for Culture and Sport, said: “We are pleased that no one was hurt at Sandal Castle this morning and urge everyone to take note of the warning signs we have around the site.
“Sandal Castle is an important part of Wakefield’s heritage and we ask people to respect the monument and to follow our safety guidance. We will be reviewing the current arrangements we have in place to see if anymore could be done to help people stay safe and protect the site.
“We would like to thank West Yorkshire Fire and Rescue Service and the visitors who helped this morning.”