Until 2002, Monaco's succession law was not entirely based on male primogeniture. The succession is defined in Article 10 in Monaco's Constitution, which limited the succession to the reigning Prince's descendants. This law excluded collateral lines, including Prince Rainier's older sister, Princess Antoinette, and her children. The Sovereign Prince was also permitted to adopt an heir, after he reached the age of 50. This was done in order for Rainier's mother, Charlotte, who was the illegitimate daughter of Prince Louis
Prince Louis, who was the son of Prince Albert, did not have any legitimate issue. But because there was a fear that Monaco could fall into German hands -- the next possible heir was the Duke of Urach -- legislation was effected to allow Louis to adopt Charlotte so she and her descendants could have succession rights.
Charlotte was declared heir apparent after her father succeeded to the throne in 1922. In 1944, she ceded her rights to her son Rainier.
Prince Rainier and his wife, the American movie star, Grace Kelly, were the parents of three children, Caroline, Albert and Stephanie. Under the old succession law, Caroline and Stephanie and their legitimate descendants, had succession rights only during their father's lifetime. Succession was limited to the direct or adopted heirs.
The new Constitution of 2002 amended Article 10. The clause about adoption was removed, and succession to the throne is now male primogeniture and limited to the Sovereign Prince and his siblings and their descendants. If the Sovereign Prince dies without legitimate heirs, the throne will pass to the descendants of his siblings. Thus, when Albert II dies, his sisters and their legitimate (or legitimated) descendants remain can inherit.
Prince Albert's two natural children, Jazmin Grimaldi, and Alexandre Costa, have no rights to the throne. Princess Antoinette and her descendants are also now excluded from the succession but the Constitution does include a clause that would allow for a Prince to be named from a descendant of a previous Sovereign Prince.
The current line of succession: Princess Caroline, Andrea, Pierre and Charlotte Casiraghi, Princess Alexandra of Hanover, Princess Stephanie and her two older children. Louis and Pauline Ducret. The two children were born before Stephanie married their father, Daniel, but were legitimated at the time of the marriage. Her youngest daughter, Camille, is not eligible for the throne because she is illegitimate.
Heirs must be born Monegasque citizens in order to succeed, but being Roman Catholic is not a requirement. Princess Alexandra of Hanover is Lutheran.
Should Caroline succeed her brother, her children and her sister and her sister's children remain eligible. But if Caroline dies before her brother, and Andrea succeeds Albert, Princess Stephanie and her descendants cease to be heirs. The succession will be limited to Andrea and his siblings and their eligible descendants.