Schiedam was founded in Rotterdam; around the year 1230 the river Schie was dammed by the Lord of Wassenaer and the Amtlord Dirk Bokel of the Amt Mathenesse, this to protect the existing polderland against the seawater from the North Sea. In 1247, Lady Adelaide (Aleida) of Holland married John I, Count of Hainaut. As dowry she received from him the eastern part of the dam together with the adjacent polder. The dam attracted many trade activities because goods for and from the hinterland (Delft, and further away Leiden and Haarlem) had to be transhipped. A small town developed swiftly around the dam and its activities. In the year 1275 Schiedam received city rights from Lady Adelaide, this in her capacity as sister of William II, the reigning Count of Holland and becoming King of the Romans. She ordered the building of a castle near the Schie, which is known till today as the "Castle Mathenesse" (Dutch: "Huis te Riviere" or "Slot Mathenesse"). Remnants of a donjon, which were once part of the castle, are still visible today in the centre of Schiedam and near the city office.