On James' death in 1443, his oldest son William became 8th Earl of Douglas. The following year he married, with Papal dispensation, his first cousin Margaret, the "Fair Maid of Galloway", daughter of the 5th Earl. In doing so he reunited the Black Douglas estates with the Lordship of Galloway, still held by the Fair Maid's grandmother Princess Margaret. The marriage was unpopular with the other nobles who were wary of the power of the Earl, as well as his influence over the young James II who was still a minor. In 1447 Earl William forced the elderly Princess Margaret to give up Threave Castle and retire to Lincluden, finally giving him control of Galloway. He began a series of improvements to the fortifications at Threave, demolishing the earlier outbuildings and constructing elaborate outer defences. These included a defensive wall along the river bank, as well as the "artillery house", a curtain wall with three towers designed to be defended with guns. It is considered to be one of the first purpose-built artillery defences to be built in Britain.