The castle passed to the Beck family through marriage in 1629, but when Jochum Beck (1602-1682) lost the family fortune, it was sold to Corfitz Ulfeldt (1606–1664) to repay his debts. Ulfeldt was a Danish aristocrat famous for having switched sides. When he showed up at the peace negotiations at the Treaty of Roskilde proceedings to negotiate on behalf of Sweden, he was convicted of treason by a Danish court. Soon thereafter, he was also convicted of treason by a Swedish court, and was forced into exile. His wife Leonora Christina (1621-1698), daughter of King Christian IV, was captured in his place by the Danish authorities and was imprisoned in the Blue Tower in Copenhagen for 22 years.