The flag was adopted just before Qatar gained independence from Britain on September 3, 1971. Qatar modified its entirely red flag with the addition of a white vertical stripe at the hoist to suit the British directive in the mid-19th century. The nine-pointed serrated edge was added to the Qatar flag in the mid-20th century and the maroon color was adopted in 1949, thus creating the modern day national flag. In 1855, Shaikh Jassim bin Mohammed Al Thani already used a flag with similar pattern and purplish-red and white colours. The flag was officially adopted on July 9, 1971, although a nearly identical flag (only differing in proportion) had been used since 1949.
The use of purple coloring in the country dates back several centuries. It has been asserted that Qatar was the site of the earliest known production of shellfish dye during the rule of the Kassites and that they operated a dye industry on the coast of Qatar which produced purple dye. Qatar was also known for its production of purple dye during the rule of the Sasanian Empire.Mohammed bin Thani, who ruled from 1847–1876, proposed the creation a flag with a purple-red color in order to unify the state and highlight its historic significance. The flags colors were tinted darker by the sun, resulting in a maroon coloring. In 1932, the British Navy suggested an official flag should be designed. They proposed that the flag be red, but Qatar rejected the red coloring and used maroon instead.