Citizenship in Morocco is governed by the Code de la Nationalité Marocaine, first adopted 1958 and substantively amended most recently in 2007. The 2007 reforms, building on 2004 reforms to the family code, allowed women to pass their nationality to their children on an equal basis with men (see Le Nouveau Code Marocain de Nationalité et Son Impact Sur les Enfants Issus de Mariage Mixte).  The UN Committee on the Rights of the Child welcomed the changes, but expressed concern that in 2014 rural women often remained unaware of their right to transmit Moroccan nationality to their children, while 14 percent of births were unregistered. Discrimination between men and women in relation to transmission of nationality to spouses still remains.

The territory of Western Sahara, administered by Morocco, has been contested since 1975 between Morocco and the Sahrawi Arab Democratic Republic. While Morocco considers Sahrawis to have Moroccan nationality, those resident in refugee camps in Algeria are considered stateless in international law.