The flag of Morocco is made of a red field with a black-bordered green interwoven star. Red has considerable historic significance in proclaiming the descent of the royal family from the Prophet Muhammad via Fatima, the wife of Ali, the fourth Caliph. Red is also the color that was used by the Sherifs of Mecca and the Imams of Yemen. From the 17th century on, when Morocco was ruled by the Hassani Dynasty, the flags of the country were plain red. In 1915, during the reign of Mulay Yusuf, the green Seal of Solomon was added to the national flag. The Seal is an interlaced pentangle, used as a symbol in occult law for centuries. While Morocco was under French and Spanish control, the red flag with the seal in the center remained in use- but only inland. Its use at sea was prohibited. When independence was restored in 1956, it once again became the national flag.
At the time of the rule of the Marinid and Saadi dynasties, the Moroccan flag used to be completely white. It was only around 1666, that the Alaouite Dynasty changed the flag color from white to deep red, which is the color symbol of the descendants of Prophet Muhammad. The red-only flag stayed the same until the beginning of the French protectorate, during which period, red-colored flags started to create a general confusion because of the new communist nations who adopted red as a color for their own flags as well.
Rachid Sbihi, Moroccan historian and numismatic specialist, says that the decision taken then was to keep the red-only flag as a symbol for the Royal Makhzen, while the national flag would bear a 5-pointed green star in its center. It would stay like this until the royal Dahir of 1915 changed the 6-pointed star to a 5-pointed star.
The 6-pointed star used in the Moroccan flag is also known as the Seal of Solomon or the Star of David. However, it was not chosen to be on the Moroccan flag for that reason, since the 6-pointed star is a symbol of life, wisdom and good health common to all three major monotheistic religions. The Seal of Solomon was also stamped on the 100 and 200 francs coins as well as on some Makhzen stamps until 1954.
According to Rachid Sbihi, it seems that the change of stars was done by General Hubert Lyautey when getting ready to send Moroccan troops to fight during World War I. Rachid Sbihi points out that reasons why General Lyautey would do such a thing were neither clear nor valid. The Moroccan people however, were given another explanation that could be the right one: the new star was best adapted to the country's religion and faith since the 5 branches could symbolize the 5 pillars of Islam. The Moroccan flag is also used by Moorish-Americans of the Moorish Science Temple of America.
The new flag however would only be displayed flush on the ground until Morocco's independence in 1956.