Thurso's history stretches back to at least the era of Norse Orcadian rule in Caithness, which ended conclusively in 1266. Neolithic horned cairns found on nearby Shebster Hill, which were used for burials and rituals, date back about 5,000 years. The town was an important Norse port, and has a later history of trade with ports throughout northern Europe until the 19th century. In 1330 Scotland's standard unit of weight was brought in line with that of Thurso at the decree of King David II of Scotland, a measure of the town's economic importance. Old St Peter's Kirk is said to date from circa 1220 and the time of Caithness Bishop Gilbert Murray, who died in 1245.