On 1 February 1958, Egypt and Syria merged to create the Untied Arab Republic (UAR). The concept had first been proposed by the Egyptian President Gamal Abdel Nasser as the first step towards a pan-Arab state in the Middle East. Nasser was encouraged by his popularity following the Suez Crisis on 1956, and pushed ahead with the idea.
The formal agreement to create the United Arab Republic was signed on 22 February 1958, after referenda were undertaken. Nasser was elected president of the UAR and Cairo selected as its capital. Nasser extended his previous one-party state from Egypt to the whole of the UAR, harshly dealing with rebellious groups such as the Syrian Communist Party. Hostile relations with neighboring states such as Jordan led to international pressure being applied in the region.
On the 29th September 1961, a coup d'état in Syria brought the union to an end. Syria's acting head of state, Maamun Shafiq al-Kuzbari, declared the country to be once again independent.
Egypt retained the title United Arab Republic until 2 September 1971 when it became the Arab Republic of Egypt.
The flag of the UAR was developed from that of Egypt -- red, white, and black horizontal bands with the addition of two green stars in the middle. This was retained as the flag of Syria after its secession in '61.