Moving north up the coast, we have a lot more information about the village of Rattray. Rattray has been memorably described by Richard Muir as having a remote location at the tip of the great sea-splitting knuckle of north-east Scotland. As we shall see, it achieved the distinction of becoming a royal burgh, but as it never grew to more than two or three dozen dwellings I will call it a village.Rattray lay between Peterhead and Fraserburgh at the south-east end of what was once a large inlet of the sea, and has now become the Loch of Strathbeg. By the thirteenth century a spit of sand and shingle had developed, running south east from Lonmay at the northern end of the bay. Between the spit and Rattray Head there was a channel of water wide and deep enough to allow boats to pass through it, at least at high tide. Sheltered by the shingle spit and Rattray Head the lower end of the bay appeared to offer a good place for a harbour.The first documentary evidence for the castle and village of Rattray dates from the early thirteenth century. In 1214 William Comyn, a nobleman from England, married Marjory, the daughter and heiress of the last Mormaer of Buchan, and he became the Earl of Buchan. William Comyn founded the Abbey of Deer; and the chapel at Rattray, dedicated to St Mary, is thought to have been built as an offshoot of the abbey. Surviving records refer to gifts made to the chapel by William Comyn, including two stones of wax from the lands and mill of Strichen and Kindrought.The castle of Rattray lay on a prominent sand dune about 550 metres north east of the church. It directly overlooked the channel that allowed boats access to the bay and harbour. This area was fortified around the end of the twelfth century, but after the arrival of William Comyn it was developed for more domestic purposes, with a mansion that consisted of a timber framed hall and possibly other buildings.The Comyn earldom of Buchan came to an end in 1308, when John Comyn was defeated in battle by Robert the Bruce. To assert his mastery of Buchan Robert the Bruce engaged in a programme of harrying, which may have included the burning down of Rattray castle. Soon afterwards a new mansion was built of stone, comprising a large hall in the centre of the mound and at least two other buildings on its western side.The village extended between the castle and the church. The present road past the ruins of the church is thought to follow the line of the medieval road through the village. The properties within the village were marked by ditches running at right angles to the road, extending on the west towards the water, and on the east to an estate called Broadland. Roughly in the centre of the village the road crossed a stream, no longer there, that ran down to the water, and there is evidence that a path connected the road and the water’s edge just north of the steam.Archaeological excavations were carried out at Rattray every summer between 1985 and 1990 by a team headed by H K Murray and J C Murray. The finds were thoroughly analysed, and a comprehensive report was published in 1993.H K Murray, J C Murray, and others, Excavations at Rattray, Aberdeenshire: A Scottish Deserted Burgh, Medieval Archaeology, 1993, 37, 109-218.