Archaeologists excavating a hill outside the medieval Polish town of Puck have found two circular defensive ditches, stone cannonballs and fragments of granite millstones around what they believe was a 15th-century windmill — evidence that when war came, the mill was turned into a fortified position.

The dig at the hill known as Wzgórze Wiatraczne, or Windmill Hill, in northern Poland has uncovered more than 300 archaeological features across more than 5,000 square meters. Near the center of the site, two roughly circular ditches about 30 and 50 meters in diameter ring the probable location of the mill, according to PAP, the Polish news agency that reported the findings.

The ditches run about 1.5 meters deep and between roughly 1.5 and 2.5 meters across. Inside the enclosed area, the team found the filled cellar of another structure and large fragments of grooved granite millstones whose manufacture matches techniques used from the late medieval period on. The cannonballs add weight to the military reading of the earthworks.

The excavation matches paper records. A map from 1634 called the area Muhlenberg — Mill Hill — and written sources mention two windmills there in the 15th century. The central structure was probably a windmill associated with the Teutonic Order, the researchers said, though the wooden mill itself is long gone.

The team has not pinned down when the defenses were thrown up, but the strongest possibility is the Thirteen Years’ War of 1454 to 1466. Puck was fought over twice in that conflict: Teutonic forces took the town after a short siege in 1460, and four years later forces from Gdańsk besieged the Teutonic troops holding it. A windmill on high ground overlooking the town’s approaches was exactly the sort of place defenders would need to hold, and Dr. Michał Starski of the University of Warsaw believes they secured it with the double ring of ditches, likely backed by a modest earthen rampart.

The mill itself may not have survived the fighting, Dr. Starski believes. If later work confirms the dating, the site would be the first known field fortifications connected to the Thirteen Years’ War.

War was only one chapter on the hill. In the 16th century, after the fighting had ended, much of the land passed to Puck’s Protestant community, which buried its dead there. Archaeologists have so far recorded about 150 graves from the Lutheran cemetery.

The human remains survive poorly, but objects buried with some of the dead trace the customs of the early modern town. Four coins date from the second half of the 15th century and the 16th century — possibly, the researchers suggest, a trace of the tradition sometimes called Charon’s obol, a coin for the dead. A one-piece clay pipe from the 17th century appears to have been a personal possession placed beside the person who smoked it.

Below everything else, the hill holds earlier layers still: remains of a settlement of the Lusatian Culture, probably from the first half of the first millennium B.C., and several early medieval pits. Altogether, the site compresses more than 2,000 years of people living, working, fighting and burying their dead on one patch of ground.

Next, the researchers want to refine the dates of both the earthworks and the burials, and to learn more about the people in the cemetery — their health, and the shape of early modern life in Puck. For now, the picture is of a hill that kept changing jobs: a mill that ground flour, a position worth defending, and then ground for graves.