▁the ▁seven ▁Elect ors ▁held ▁territ ories ▁in ▁the ▁Middle ▁Rh ine ▁Valley . ▁ ▁The ▁political ▁landscape ▁was ▁a ▁patch work , ▁as ▁the ▁parts ▁of ▁these ▁territ ories ▁were ▁not ▁connected . ▁ ▁initially , ▁the ▁cast les ▁served ▁to ▁secure ▁territory . ▁ ▁In ▁the ▁late ▁ 1 2 th ▁century , ▁the ▁princes ▁discovered ▁custom s ▁re venue ▁as ▁a ▁source ▁of ▁income ▁and ▁some ▁cast les ▁were ▁built ▁to ▁control ▁custom s . ▁ ▁Cast les ▁were ▁also ▁built ▁outside ▁cities ▁to ▁keep ▁the ▁asp ir ations ▁to ▁freedom ▁of ▁the ▁city ▁dwell ers ▁in ▁check . ▁ ▁By ▁the ▁end ▁of ▁the ▁ 1 4 th ▁century , ▁fire ar ms ▁were ▁introduced ▁in ▁the ▁area . ▁ ▁Struct ural ▁responses ▁were ▁needed , ▁which ▁only ▁wealth y ▁castle ▁own ers ▁could ▁afford . ▁ ▁Many ▁cast les ▁lost ▁their ▁strateg ic ▁importance ▁to ▁fire ar ms ▁in ▁this ▁period . ▁ ▁Most ▁cast les ▁decl ined ▁slowly ▁or ▁were ▁abandoned . ▁ ▁In ▁the ▁Th irty ▁Years ' ▁War , ▁many ▁cast les ▁were ▁destroyed ▁by ▁passing ▁troops . ▁ ▁The ▁final ▁destruction ▁of ▁almost ▁all ▁cast les ▁was ▁brought ▁about ▁by ▁Louis ▁XIV ' s ▁troops ▁during ▁the ▁War ▁of ▁the ▁Pal at ine ▁Su cc ession . ▁ ▁Only ▁the ▁high ▁cast les ▁Fest ung ▁Ehren bre it stein , ▁Mark s burg ▁and ▁Burg ▁R he inf els ▁were ▁sp ared . ▁ ▁With ▁the ▁advent ▁of ▁Rh ine ▁rom antic ism ▁after