William, 3rd Gordon of Earlston and his eldest son Alexander were with the Covenanting force deafeated at the Battle of Bothwell Bridge in 1679. William was killed and Alexander was imprisoned in Edinburgh Castle until 1689. His second son, Sir William Gordon married Mary Campbell, the heiress of Sir George Campbell of Cessnock, a leading Covenanter and a landowner in the parish parish of Cumnock (Old and New). Sir William was honored as 1st Baronet of Afton in 1706 . He died without issue in 1716, and his elder brother Sir Alexander, now a free man, succeeded as 2nd Baronet of Afton. Sir Alexander was succeeded by his son Sir Thomas Gordon and he in turn by his son Thomas, younger of Earlston. Thomas married Catherine Campbell, daughter of Daniel Campbell of Shawfield and together they had two sons, Thomas and Daniel and one daughter Catherine.