Human remains unearthed last year under a school playground in Edinburgh, UK do not belong to a Bronze Age individual, as previously thought, but to a 16th-century pirate who was executed nearby, the City of Edinburgh Council said.

The skeleton was found during survey work for an extension at the city’s oldest working primary school, located near Newhaven harbor.

“Workers expected to find remains of the original harbor and shipbuilding but instead uncovered human bones,” the City of Edinburgh Council said in a statement.

Most Famous Pirates of the Caribbean: Photos

Some 4,000-year-old shards of pottery found near the poorly preserved remains led archaeologists to believe the remains were from the Bronze Age.

But recent radiocarbon dating by experts at AOC Archaeology indicates the skeleton was from the 16th or 17th centuries.

“Thanks to carbon dating techniques, archaeologists now know that the skeleton was likely to have been a murder victim — and quite possibly a pirate,” Councillor Richard Lewis, Culture Convener for the City of Edinburgh Council, said.

Pirates: A Long, Scurvy History

A a gallows-type structure called a gibbet, commonly used to execute witches and pirates, stood on the edge of Newhaven dockyards 600 years ago.

Archaeologists believe the man, who was likely in his 50s, was hung on that device for piracy or other crimes and displayed in plain sight of ships to deter fellow pirates.

He was then buried in a shallow, unmarked grave.

Video: Talk Like a Pirate: How Dialects Are Formed

Forensic artist Hayley Fisher, along with AOC Archaeology, created a facial reconstruction of the pirate’s skull.

The school’s headteacher, Laura Thompson, said the archaeologists will hold a special lesson about how they have used science to analyze the remains.

“The pupils think it’s fantastic that a skeleton was found deep underneath their playground,” Thompson said.