In 1068, Harold's sons raided the south-west coast of England (dealt with by William's local commanders); there were uprisings in the Welsh Marches, Devon and Cornwall. William appointed earls who, in Wales and in all parts of the kingdom, undertook to guard the threatened frontiers and maintain internal security in return for land.
In 1069, the Danes, in alliance with Prince Edgar the Aetheling (Ethelred's great grandson) and other English nobles, invaded the north and took York. Taking personal charge, and pausing only to deal with the rising at Stafford, William drove the Danes back to their ships on the Humber. In a harsh campaign lasting into 1070, William systematically devastated Mercia and Northumbria to deprive the Danes of their supplies and prevent recovery of English resistance. Churches and monasteries were burnt, and agricultural land was laid to waste, creating a famine for the unarmed and mostly peasant population which lasted at least nine years. Although the Danes were bribed to leave the north, King Sweyn of Denmark and his ships threatened the east coast (in alliance with various English, including Hereward the Wake) until a treaty of peace was concluded in June 1070.
Further north, where the boundary with Scotland was unclear, King Malcolm III was encroaching into England. Yet again, William moved swiftly and moved land and sea forces north to invade Scotland. The Treaty of Abernethy in 1072 marked a truce, which was reinforced by Malcolm's eldest son being accepted as a hostage.
William consolidated his conquest by starting a castle-building campaign in strategic areas. Originally these castles were wooden towers on earthen 'mottes' with a bailey (defensive area) surrounded by earth ramparts, but many were later rebuilt in stone. By the end of William's reign over 80 castles had been built throughout his kingdom, as a permanent reminder of the new Norman feudal order.
William's wholesale confiscation of land from English nobles and their heirs (many nobles had died at the battles of Stamford Bridge and Senlac) enabled him to recruit and retain an army, by demanding military duties in exchange for land tenancy granted to Norman, French and Flemish allies. He created up to 180 'honours' (lands scattered through shires, with a castle as the governing centre), and in return had some 5,000 knights at his disposal to repress rebellions and pursue campaigns; the knights were augmented by mercenaries and English infantry from the Anglo-Saxon militia, raised from local levies. William also used the fyrd, the royal army - a military arrangement which had survived the Conquest. The King's tenants-in-chief in turn created knights under obligation to them and for royal duties (this was called subinfeudation), with the result that private armies centred around private castles were created - these were to cause future problems of anarchy for unfortunate or weak kings. By the end of William's reign, a small group of the King's tenants had acquired about half of England's landed wealth. Only two Englishmen still held large estates directly from the King. A foreign aristocracy had been imposed as the new governing class.
The expenses of numerous campaigns, together with an economic slump, prompted William to order a full-scale investigation into the actual and potential wealth of the kingdom to maximise tax revenues. The Domesday survey was prompted by ignorance of the state of land holding in England, as well as the result of the costs of defence measures in England and renewed war in France. The scope, speed, efficiency and completion of this survey was remarkable for its time and resulted in the two-volumed Domesday Book of 1086, which still exists today. William needed to ensure the direct loyalty of his feudal tenants. The 1086 Oath of Salisbury was a gathering of William's 170 tenants-in-chief and other important landowners who took an oath of fealty to William.
William's reach extended elsewhere into the Church and the legal system. French superseded the vernacular (Anglo-Saxon). Personally devout, William used his bishops to carry out administrative duties. Lanfranc, Archbishop of Canterbury from 1070, was a first-class administrator who assisted in government when William was absent in France, and who reorganised the Church in England. Having established the primacy of his archbishopric over that of York, and with William's approval, Lanfranc excommunicated rebels, and set up Church or spiritual courts to deal with ecclesiastical matters. Lanfranc also replaced English bishops and abbots (some of whom had already been removed by the Council of Winchester under papal authority) with Norman or French clergy to reduce potential political resistance. In addition, Canterbury and Durham Cathedrals were rebuilt and some of the bishops' sees were moved to urban centres.
At his coronation, William promised to uphold existing laws and customs. The Anglo-Saxon shire courts and 'hundred' courts (which administered defence and tax, as well as justice matters) remained intact, as did regional variations and private Anglo-Saxon jurisdictions. To strengthen royal justice, William relied on sheriffs (previously smaller landowners, but replaced by influential nobles) to supervise the administration of justice in existing county courts, and sent members of his own court to conduct important trials. However the introduction of Church courts, the mix of Norman/Roman law and the differing customs led to a continuing complex legal framework.
More severe forest laws reinforced William's conversion of the New Forest into a vast Royal deer reserve. These laws caused great resentment, and to English chroniclers, the New Forest became a symbol of William's greed. Nevertheless the King maintained peace and order. The Anglo-Saxon Chronicle in 1087 declared 'he was a very stern and violent man, so no one dared do anything contrary to his will ... Amongst other things the good security he made in this country is not to be forgotten.'
William spent the last months of his reign in Normandy, fighting a counter-offensive in the French Vexin territory against King Philip's annexation of outlying Normandy territory. Before his death on 9 September 1087, William divided his 'Anglo-Norman' state between his sons. William bequeathed Normandy as he had promised to his eldest son Robert, despite their bitter differences. His son William Rufus was to succeed William as King of England, and the third remaining son, Henry, was left 5,000 pounds in silver. William was buried in his abbey foundation of St Stephen at Caen. Desecrated by Huguenots (1562) and Revolutionaries (1793), the burial place of the first Norman king of England is marked by a simple stone slab.