In the 15th century, Freinsheim passed to the Electorate of the Palatinate, under whose care the existing fortifications were completed. The town wall's most recent building work is the "äußeres Eisentor" (“outer iron gate”), finished in 1514. In 1689, Freinsheim sustained heavy destruction in the Nine Years' War (known in Germany as the "Pfälzischer Erbfolgekrieg", or War of the Palatine Succession); only foundations were left standing. In the 18th century came reconstruction. Administrative functions within the Electorate of the Palatinate (such as the institution of an "Unteramt") helped bring about an economic upswing. After the French Revolution and the Congress of Vienna, Freinsheim passed to the Kingdom of Bavaria along with the rest of the Palatinate on the Rhine’s left bank. Until 1818, Freinsheim belonged to a "Ganerbschaft" (joint inheritance), which comprised the Leiningen villages of Leistadt, Herxheim am Berg and Kallstadt as well as the Electorate of the Palatinate villages of Freinsheim and Weisenheim am Sand.