A council worker was trapped for more than an hour after the walls of a grave he was digging collapsed on top of him.
Emergency services were called when the man in his 20s was buried up to his waist in sandy soil.
The shored-up walls of the “deep” lair gave way as he and a colleague were working on it at Kintore Cemetery.
Rescuers dug him out using their hands and buckets.
The alarm was raised shortly before 2pm – and the man was freed shortly after 3pm.
He was taken to Aberdeen Royal Infirmary by ambulance but his injuries are not thought to be serious.
His colleague was able to free himself before a fire crew from Inverurie arrived at the scene.
Aberdeenshire Council has launched an investigation into yesterday’s incident.
Fire service station manager Craig Cracknell – who led the rescue operation – said his team’s main focus was making sure more earth did not give way as they worked to free the casualty.
He said: “The men were in digging graves. It was all shored-up, but the shoring gave way.
“He was trapped from the waist down, his legs were trapped in.
“One man made his own way out. One was trapped in there. Firefighters made the scene safe and dug him out.
“It was quite deep. He wasn’t too panicky, but he couldn’t get free. The key was to make sure it wasn’t going to get any worse.
“The only way to get him out was to hand dig. It was just spitting rain at that point, but that was a consideration.
“The local crew from Inverurie did a really good job. The diggers that were there had attempted to get him out.”
Inverurie watch manager Graeme Duncan added: “The ground appeared to be very sandy and that’s likely to have caused the sides to cave in.
“Others working at the graveyard tried to help him initially, before they called the fire service for assistance.”
Last night, the council’s head of roads, landscape services and waste management, Philip McKay, said: “One of our team was taken to hospital this afternoon following an incident where the side of a lair collapsed while he was working at Kintore Cemetery, trapping him by the legs.
“At this time our colleague does not appear to have suffered serious injuries, but has been taken to hospital for further checks.
“Police Scotland and the Scottish Fire and Rescue attended the incident, and we would like to thank them for their help.
“Aberdeenshire Council have commenced an investigation into the circumstances that led to the incident and I am sure all the team will add their best wishes for our colleague’s speedy recovery.”
A police spokeswoman said officers had been called to assist the other emergency services, adding there were “no serious injuries”.