Body snatchers, violent ghosts, a loyal dog, and Harry Potter characters may seem like strange bedfellows, but in Scotland’s gorgeous, gothic capital city of Edinburgh, the four merge to make up the ghostly lore surrounding one of the world’s most haunted graveyards. In the city’s historic center, perched on a hill overlooking the “new” town (built in the 1700s), Greyfriars Kirkyard is a seemingly idyllic cemetery dating back to the 1560s. But, to this day, it has enough strange goings-on to attract a steady stream of ghost hunters, wizarding fans, and the television producers and writers who follow in their wake.

Haunting the cemetery is George MacKenzie, called the MacKenzie Poltergeist, who is said to be one of the most aggressive and active paranormal figures around. Known during his lifetime as a ruthless persecutor of the Scottish Covenanters, a Presbyterian movement in the 17th century, MacKenzie’s spirit, according to legend, was released in 1999 when a homeless man looking for a spot to sleep broke into his final resting place, the Black Mausoleum. It was a fate predicted by famed Scottish poet Robert Louis Stevenson who referenced MacKenzie in his 1879 book “Edinburgh: Picturesque Notes,” writing, “When a man’s soul is certainly in hell, his body will scarce lie quiet in a tomb however costly; some time or other the door must open, and the reprobate come forth in the abhorred garments of the grave.”

The Covenanters’ Prison is connected to Greyfriars Kirkyard by a stone gateway and locked metal grate near MacKenzie’s mausoleum. It was once home to an estimated 1200 unfortunate members of a failed anti-government revolution in 1679. Conditions at the prison were so brutal that only 257 of the prisoners came out alive (a portion of whom escaped or pledged loyalty to the crown) four months after their mass incarceration.

Today, tour purveyors conducting nighttime excursions around the graveyard have reported some mysterious happenings; many participants have emerged from inside the prison and mausoleum with bruises, burns, scratches, and even broken bones, attributed to long-dead prisoners and their violent oppressor. In 2006, The Scotsman wrote that there had been 450 documented attacks, 140 people who had collapsed, and even suspicion that the Mackenzie Poltergeist was responsible for the death of one local psychic.

In the daylight hours, Greyfriars Kirkyard is a beautiful place for a tranquil stroll, revealing only hints of its bloody past. Typical of most old cemeteries, eerie carved-stone Angels of Death and other ghoulish figures adorn many of the tombstones. But it’s the imposing metal grills covering some of the graves that really stand out. In the early 1800s, the University of Edinburgh’s prestigious medical studies program flourished, inadvertently sparking an underground trade in corpses stolen by body snatchers and sold to local students. Soon, the nefarious practice became an epidemic. To prevent these entrepreneurs from making off with their loved ones, families would protect the graves by boxing them in with iron cages, called mortsafes, that ran deep into the ground.

But not all of the cemetery’s legends are so ghoulish.

For the past 140 years, a noble-looking, bronze Skye terrier has stood guard outside the grounds and watched over the kirkyard. Edinburghers have championed the story of the Greyfriars Bobby: a loyal dog that stood vigil over his deceased owner’s grave for 14 years until his own death, when he was buried near his beloved master’s plot. The story has been memorialized in books and movies, but historians now say that while the pup existed, his extended mourning was probably a fabricated marketing ploy by the cemetery curator and a nearby restaurant owner to encourage tourism. He most likely stuck around for the food and attention he got from visitors.

The cemetery is also just steps from the now-landmark Elephant House Cafe, where J.K. Rowling first scribbled the lines of Harry Potter in a window seat overlooking George Heriot’s, an uncannily Hogwarts-esque school. Among the graves in Greyfriars Kirkyard is one with a headstone reading “Thomas Riddell,” which many fans think may have inspired the birth name of Lord Voldemort, the series’ villain. Harry Potter devotees make pilgrimages to the site, leaving notes and flowers on the 197-year-old grave.

Ghosts, wizards, missing bodies, and legendary dogs—what more could one cemetery ask for?