On the death of his grandson, William, 3rd Lord Herries of Terregles, the male line failed. He was succeeded by his daughter Agnes, who married Sir John Maxwell, second son of Robert Maxwell, fifth Lord Maxwell. Their great-grandson, the 7th Lord Herries of Terregles, succeeded as third Earl of Nithsdale in 1667 on the death of his kinsman the second Earl. The earldom had been created in 1620 for Robert Maxwell, ninth Lord Maxwell. The third Earl's grandson, the fifth Earl, took part in the Jacobite rising of 1715. He was attainted in 1716, his peerages forfeited and sentenced to death. However, he managed to make a celebrated escape from the Tower of London by changing clothes with his wife's maid the day before his execution.