William of Ypres (Dutch: Willem van Yper; c. 1090 – 24 January 1165) was a Flemish nobleman and one of the first mercenary captains of the Middle Ages. Following two unsuccessful bids for the County of Flanders, William became King Stephen of England's chief lieutenant during the civil war of 1139–54 known as the Anarchy. He held Kent, though not the title of earl, until the early years of King Henry II's reign, when he returned to Flanders.
William was an illegitimate son of Philip of Loo, who was the son of the Flemish count Robert the Frisian and younger brother of Robert II, Count of Flanders. William's mother was a wool carder, which further diminished his status; Louis VI of France pointed out that she never rose from that station. The exact date of his birth is unknown, and although C.1090 is the commonly used date of his birth, several other dates later in the same decade are also plausible. His brother, Theobald Sorel, was likely born of another relationship of hers. His maternal origin did not prevent him from having a large influence in Flanders.
A succession crisis ensued in the County of Flanders in 1119 upon the sudden death of the childless Count Baldwin VII, William's cousin. Though illegitimate, William remained the last male-line descendant of Count Robert the Frisian. His claim to the countship was supported by Baldwin's mother, the powerful dowager Clementia of Burgundy,and her second husband Godfrey I, Count of Louvain, but Flanders nevertheless passed to the Danish prince Charles the Good, son of Robert I's daughter Adela and Canute IV of Denmark .. The chronicle of Galbert of Bruges attributes his failure to his illegitimate birth. It is possibly the case that, rather than being an active participant, William was simply a figurehead manipulated by his more powerful relatives; giving weight to this argument is the fact that not only did he survive the succession crisis, but he was also granted the same positions as his father, i.e. the effective Count of Ypres and the surrounding localities.
Charles was assassinated on 2 March 1127 by the Erembald Clan, who then offered the countship to William, but he did not wish to be associated with them and he severed all ties with the murderers, going so far as to execute one of their members on 20 March.. Louis VII, as feudal overlord, rejected William's claim using his mother's status as an excuse, but this time William responded with force. He used funds allegedly given to him by King Henry I of England to hire 300 mounted warriors, with whom he occupied Ypres and forced its merchants to accept him as count. Henry was eager to prevent Flanders from passing to his nephew, William Clito, another contender and second cousin of William of Ypres, as William Clito also laid claim to Henry's Duchy of Normandy. The war united him with another nephew of Henry and likewise a second cousin, Stephen of Blois. Ypres was besieged a month later on the 26 April by William Clito and Louis VI of France. After bitter fighting, the gates of Ypres were opened by the citizens, and William of Ypres was imprisoned along with his brother on 10 September.At Bruges there was an inquest into the death of Charles the Good. It is unclear how seriously William's involvement was considered, but in the end he escaped implication and was released in March 1128 having given an oath of loyalty to Clito. However, by this stage Clito had alienated most of his allies and faced a new opponent Thierry of Alsace, who was the son of Gertrude, the daughter of Robert the Frisian. Clito was killed in July 1128 at the siege of Aalst, leading to Thierry being confirmed as Count. William made one final attempt to take the county in 1130, though the events are veiled in obscurity. He was unable to prevail against Thierry and unlike his predecessors, Thierry was less than forgiving, banishing William from Flanders sometime between 1133 and 1135..
Having failed to established himself as Count of Flanders, William went from his wife's lands in Sluis to Stephen's County of Boulogne. Stephen's accession to the English throne following Henry I's death in 1135 finally changed William's fortunes for the better. He commanded Stephen's troops against the forces of their cousin, Henry's daughter Empress Matilda, who claimed the throne. Many of the soldiers were William's fellow Flemings, including his brother. Stephen's campaign in Normandy failed because the local noblemen refused to co-operate with William and other Flemings.
William was much more active in England, where he took part in the Battle of Lincoln (1141), during which Stephen was captured by the Empress's forces. William led his contingent away when it became clear that the battle was lost, for which he was reprimanded by the author of Gesta Stephani and excused by Henry of Huntingdon. At this moment most of Stephen's supporters either declared for the Empress or attempted to stay neutral. William, however, determinedly supported Stephen's wife, Matilda I of Boulogne, who took over during the King's imprisonment, and he assumed command over all of Stephen's forces. William distinguished himself during the Rout of Winchester and two subsequent battles which led to Stephen's release. He was involved in some of the most dishonorable events of the Anarchy, such as the plundering of Abingdon Abbey, burning of Wherwell Abbey and Andover, and threatening to burn St Albans.
Stephen rewarded William with the County of Kent and its revenues at Christmas 1141. Though no proof exists of his creation as Earl of Kent by King Stephen, chroniclers describe him as "possessing the county" and "having Kent in his custody". He exercised the same powers over this county as other earls over theirs, though he never adopted the comital style. William lost his sight in the late 1140s, which ended his military career and may have contributed to Stephen's compulsion to designate Empress Matilda's son, Henry Plantagenet, as his heir. William founded the Cistercian house of Boxley c. 1146 and endowed monasteries in Flanders.
Despite his fierce loyalty to King Stephen, William was very unpopular, primarily for being a foreigner, but also due to plundering and extortion (common among English magnates). Upon Stephen's death in 1154, the crown passed to Henry Plantagenet, who found it a military and political necessity to banish Flemings and other foreigners. William initially held onto Kent but, being old and blind, could not be of use to the new monarch. He left England in 1157 and returned to Lo in Flanders, living quietly and piously. He died there on 24 January 1165.