In the eleventh century, Zutphen was a royal residence for a number of years; a pfalz was built, together with a large chapter church, the predecessor of the present St. Walburgis. The counts of Zutphen acquired a lot of power, until the line of counts became extinct in the twelfth century. After the death of her father and her brother, Ermengarde, the heiress of Zutphen married the count of Guelders; her son Henry I, Count of Guelders was the first to wear both titles.