The medieval Scottish Castle of Rattray was built during the same period as the chapel Dedicated to the Virgin Mary.
 It was built by William Comyn, jure uxoris Earl of Buchan during the same period as the Castle of Rattray and was ""private chapel for the castle"" and its residents. " 
"Dedicated to the Virgin Mary"" it was possibly constructed after the ""drowning of a"..." [unknown] ""son of Comyn in the well near by."" 
The Castle of Rattray was a medieval Scottish castle, with multiple variations on its structure over approximately six centuries. 
