 The Rihemberg male line died out in 1371.In the 14th and 15th centuries the lordship contracted to the immediate surroundings of Rihemberk, a small part of the Vipava Valley, and the Kras Plateau.After the Counts of Gorizia died out in 1500, the castle passed to the Habsburgs.