Answer
In order to allow for Margrethe's succession, the Danish Act of Succession was revised, removing the previous male-only succession rule. This amendment ensured that the throne could be inherited by the eldest child of the monarch, regardless of gender, thereby paving the way for Margrethe to become the first female monarch of Denmark in centuries.