Guildford Castle was probably founded by William the Conqueror soon after 1066, as one of a series built in major towns. The mound or ‘motte’ was made by pulling up chalk dug from a deep ditch around it. Another ditch and bank enclosed the outer area called the “bailey” where the domestic building stood. The early timber buildings were replaced with stone during the 12th century. First a ‘shell-like’ of chalk was built around the top of the motte. Then, in the 1130s or 40s, the ‘great tower’, or keep, was built in two phases. The line of the first-phase battlements are marked out in plaster. The first phase was probably built as the king's private apartments, reached by an outside staircase. Not long after the tower was built a second floor was added. The great tower could have been used for defence if the castle was attacked, but it was also a symbol of the kings importance. Guildford Castle was the only royal castle Surrey and became the headquarters of the sheriff the king’s deputy in the county. He held trials for serious crimes, and prisoners were held the keep, which was the county gaol for Surrey and Sussex. The king had moved to new apartments the bailey. Henry III developed the castle into one of the most luxurious role palaces. in England. After his death in 1272 buildings fell into ruins and were later abandoned, except for the great tower which continued as the county gaol. In the early 16th century the gaol closed and the tower was used by the Daborne family, who put in the brick window surrounds and fireplaces. In 1611 James I sold the castle estate to Francis Carter. He, or his son, built a new house attached to the Castle Arch. The great tower was then abandoned and then roof taken off. The castle was bought by Guildford Borough Council 1885 and the grounds were laid out as a public park. Conservation work in 2004 saw a new roof and floors put in.