Many attempts were made by the Arab countries to form a United Arab Republic. The first two countries to engage in this initiative were Syria and Egypt on 22 February 1958. The agreement was signed by presidents Quwwatli of Syria and Nasser of Egypt, after a public referendum in both countries. These two countries adopted a flag made of three horizontal red-white-and-black stripes, with two green stars placed on the white stripe for the Republic. The two stars represented the two states which constituted the republic. After four years the Republic came to an end when Syria withdrew its membership. In spite of this development Egypt continued to use the name of United Arab Republic (UAR) and the flag until 1 January 1972.
On 17 April 1963, ambitions to constitute a new Union were revived by Egypt, Syria and Iraq. The proposed flag for the new union would have been the same as the first UAR flag, but with three stars symbolising the three states constituting the union. These ambitions were never realised, however, Iraq retained the proposed flag as its national flag. The official explanation of the three stars was that they should remind Iraqi of attempts to unify the Arab countries.