William's main administrative work concerned the navy. after the loss of Normandy exposed England to invasion by the French. In 1205 he was again one of the keepers of the royal fleet along the south coast. In the same year, he was also in charge of naval spending for the attempted invasion of France, In 1206 William was in charge of the naval forces in the
Cinque Ports and commanded the fleet that invaded
Poitou. From 1206 until 1215 he was effectively commander of King
John's navy, and helped to develop
Portsmouth as a royal dockyard. During May 1208 a royal order was issued that William's deputies in all the seaports should seize any ships in the ports that were from foreign countries, excluding Denmark, Norway and other countries that did not oppose John's diplomatic efforts. A gap in the governmental records does not allow a detailed view of William's activities for the next years, until 1212, when William is shown performing many of the same duties as earlier. He was in charge of repair of some ships and the construction of a large new ship, named the
Deulabenit, owned by the king. William was also responsible for
impressing privately owned merchant ships into royal service. These ships were used in the naval action of the
Battle of Damme at
Zwyn in 1213, when a fleet under
William Longespee, the Earl of Salisbury, destroyed a substantial French naval force and sacked the town of
Damme. In late 1213 William was directing the efforts of the seaports of south-western England and the Cinque Ports in naval affairs. In 1214 William had custody of some royal prisoners. The same year, the king ordered him to return a merchant ship if he had indeed seized it from its owner, Joscelin de Hampton. Also in 1214, William co-founded the hospital of
Domus Dei in Portsmouth with
Peter des Roches, the
Bishop of Winchester. The foundation was confirmed by the king in October 1214. John rewarded William for his service with churches in
Sheppey and
East Malling, which were granted in 1207, and the right to oversee the
royal forests in Cornwall and Devon. Other grants included lands in
Dartford and Sutton-at-Hone that had
escheated to the crown, lands in Westminster and a prebend in the royal ecclesiastical foundation at Hastings. ==Later years and legacy==