In 1713, Salic law was introduced to Spain. In 1830, Ferdinand VII who did not have any sons declared that his daughter Isabella was the next in line, instead of his brother Carlos. Carlos and his supporters called the Carlists denied it’s validity because it was a change in fundamental law without the support of the Cortes.
However the fact that Charles IV made a decree in 1789 that abolished Salic law which was adopted by the Cortes. However the Carlists denied the validity of that decree since it was never formally published. This succession dispute caused the Carlist Wars after Ferdinand VII’s death.
So under Spanish law, was the succession change in 1789 legally adopted into law?
This succession dispute caused the Carlist Wars
I would say that it was the pretext for the Carlist Wars; the conflict between Progresists and Conservatives had already been ongoing for quite some time and the dynastic crisis just gave the Conservatives a better PR message ("We are fighting for Religion and the rightful King who has been deprived of his Crown" instead of "We are fighting for Religion against the rightful Queen"). – SJuan76 Apr 13 '19 at 9:01