In 1118, prior to his ascension to the Scottish throne, Prince David established a foundation of canons regular of the order of St. Augustine at what is now Jedburgh. The foundation appeared to have the status of 'priory' in the early years and a man by the name of Daniel was described as the Prior of Geddwrda in 1139. The church was later raised to the status of monastery before becoming, in the years prior to King David's death in 1153, a fully fledged abbey dedicated to the Virgin Mary, probably in 1147.
The nave and the choir were built in the 13th century and were in place by the time Alexander III of Scotland married Yolande, daughter of the Comte de Dreux in 1285 at the church. The great abbey was said to contain the finery of the best of Norman and early English Architecture. The Abbey Church of St. Mary of Jedeworth was growing in stature and importance and the abbot was even invited to attend Scottish Parliaments.
After the defeat of the Earl of Surrey in 1297 at Stirling at the hands of William Wallace, the abbey was pillaged and wrecked by the English as retribution. Robert I of Scotland (The Bruce) continued to patronise the church during his reign in the early 14th century. In 1346, after the Scottish defeat at the Battle of Neville's Cross, the English once again slighted the church. Later that century, in 1370, David II of Scotland was instrumental in the completion of the north transept we can still see today.
The abbey faced more torture and destruction in 1410,1416 and by the Earl of Warwick in 1464. In 1523, the town and abbey were set ablaze by the Earl of Surrey. The abbey faced more indignity in 1544 at the hands of the Earl of Hertford. The end came for the great Abbey of St. Mary of Jedburgh in 1560 with the coming of the Scottish Reformation.
When the Protestant Reformation arrived in 1560, the monks were allowed to stay but the abbey was used as the parish kirk for the reformed religion. In 1671 the church was removed to the western part of the nave for safety reasons. This situation persisted until, in 1871, it was considered unsafe to continue worship at the abbey church and a new parish church was built. The Marquis of Lothian immediately started work on the restoration of the great church but in 1917 the church was handed over to the state and is now in the care of Historic Environment Scotland as a scheduled monument.
References:The stone church of Gamla Uppsala, built over the pagan temple, dates from the early 12th century. Due to fire and renovations, the present church is only a remnant of the original cathedral.
Before the arrival of Christianity in Sweden, Gamla Uppsala was the seat of Swedish kings and a ceremonial site known all over northern Europe. The settlement was home to royal palaces, a royal burial ground, and a great pagan temple. The Uppsala temple, which was described in detail by Adam of Bremen in the 1070s, housed wooden statues of the Norse gods Odin, Thor and Freyr. A golden chain hung across its gables and the inside was richly decorated with gold. The temple had priests, who sacrificed to the gods according to the needs of the people.
The first Christian cathedral was probably built in the 11th century, but finished in the 12th century. The stone building may have been preceded by a wooden church and probably by the large pagan temple.