Middleham Castle is located in the North Riding of Yorkshire. The castle has a large keep which was built in around 1170 by Robert Fitzralf. The Neville family bought the castle and it became the main residence of Richard Neville, Earl of Warwick the 'Kingmaker'. Richard (III), the Duke of Gloucester, also spent a lot of time there.
Richard (III) was given the task of bringing the north of the country under control. The conflicts between the Lancastrians and Yorkists over the previous few years had left the northern counties without any effective rulers resulting in lawlessness and unopposed Scottish raids. Richard was given the lands that the Earl of Warwick had previously possessed and he made his base at Middleham Castle.
Richard III married Anne the widow of Edward Prince of Wales who died in 1471 at the Battle of Tewkesbury. Anne was the daughter of Richard Neville, Earl of Warwick the 'Kingmaker', and had grown up with Richard III at Middleham Castle when he had been placed their for his education. Marrying Anne gave Richard III rights to the Earl of Warwick's northern estates.
Richard's only son died at Middleham Castle aged only eight. Anne was unable to have any more children and she would die in the following year. This left Richard with the problem of who should succeed him after his death.