From the end of the 12th century, Zweibrücken was the seat of the County of Zweibrücken, the counts being descended from Henry I, youngest son of Simon I, Count of Saarbrücken (d. 1182). The line became extinct on the death of Count Eberhard II (1394), who in 1385 had sold half his territory to the Count Palatine of the Rhine, and held the other half as his feudal domain. Louis (d. 1489), son of Stephen, founded the line of the House of Palatinate-Zweibrücken. In 1533, Wolfgang, Count Palatine of Zweibrücken converted Palatine Zweibrücken to the new Protestant faith. In 1559, Wolfgang founded the earliest grammar school in the town (Herzog-Wolfgang-Gymnasium), which lasted until 1987.