The county of Meulan, in Normandy, France, appeared as an entity within the region of the Vexin when the otherwise unknown Count Waleran established an independent power base on a fortified island in the River Seine, around the year 1020. Waleran's origins are subject to several genealogical myths, not least that he had predecessors in his office. Waleran was active in the politics of his day, but the extent of the county at that date is unknown. Both he and his son Count Hugh maintained an independence from the Capetian king at Paris by a judicious if dangerous alliance with the dukes of Normandy downstream. This led to the marriage of Adeline, Count Hugh's sister, to the Norman magnate, Roger de Beaumont. On Count Hugh's death in 1081 his nephew, Robert de Beaumont, acquired the county. In his time it is clear that the settlement of Meulan had thrown out a suburb (called Locenis) on to the right bank of the Seine north of the fortified island. After 1109 and the sacking of the town by Louis VI of France, Count Robert built a new castle on the bluffs of Locenis. The original island settlement was dominated now by a fortified bridge, at which river tolls were collected, and the church of St Nicaise, refounded by the count as a priory of the Norman abbey of Bec-Hellouin. Count Robert founded a collegiate church of St Nicholas in his new castle. The geographical extent of the county associated with the castle and town of Meulan becomes evident in the time of Robert I (1081–1118) and Waleran de Beaumont (1118–1166). The county then ran west along the right bank of the Seine as far as the lordship of La Roche Guyon, and included the priory of St-Martin-la-Garenne, of which Robert I was a patron. To the south of the town, the count controlled the riparine lands of the Méresais. The count had the allegiance of two powerful viscounties. The viscount of Meulan, with his own castle at Mézy-sur-Seine, was the chief tenant of the county. But the count also controlled the viscount of Mantes, and river traffic at its bridge too, although the town and the associated Mantois was in fact mostly Capetian demesne. Somehow the detached lordship of Neauphle-le-Château north of Versailles in the Yvelines was also a dependency of the county. The count also held in fee of the bishop