Flag of the United Arab Emirates

The flag of the United Arab Emirates () contains the Pan-Arab colors red, green, white, and black. It was designed in 1971 by Abdullah Mohammed Al Maainah, who was 19 years old at that time, and was adopted on 2 December 1971. The main theme of the flag's four colors is the unity of Arab nations. In 2008, there was a minor change to the Emblem.
Merchant ships may fly the alternative civil ensign, a red flag with the national flag in the canton. Emirates Airlines utilises the UAE flag as part of their livery.
All seven Emirates use the federal flag interchangeably as the flag of the emirate.
Flag of each emirate.
Each of the seven emirates within the United Arab Emirates belonged to either Hinawi or the Ghafiri tribal confederations. Both tribal confederations had a red banner representing the Hashemite dynasty and allegiance to the prophet Muhammad. The Qawasim, although part of the Ghafiri, had their own flag (a green, white, and red banner) which used to distinguish them as a maritime power. In 1820, after the British Empire campaign on Ras Al Khaimah, six out of the seven emirates signed the General Maritime Treaty with the British Empire which compelled them to be under the British Protectorate rule and protection in the region. A white segment was enforced to be added to each emirate's flag. At that time, Fujairah was not recognized as an emirate by the British and hence did not sign the general treaty in 1820 with the British protectorate and therefore continued to use its plain red flag.
On 6 November 1975, Sheikh Sultan bin Muhammad Al-Qasimi took down the British imposed flag, the White Pierced Red flag, from Sharjah and stated:
After defeating the Al-Qawasim tribe, the British occupiers gave the Qawasim this flag to replace their own flag, which used to have three horizontal colours: green, white and red from top to bottom, with a Quranic inscription 'A victory from Allah and an imminent conquest' on the white part. The loss of our national flag occurred on Saturday 8 January 1820. So what I have done now is restore dignity to the citizens of Sharjah of today and to the citizens of Sharjah of past time, all of whom have been obliged to salute the flag of the very aggressors who had removed our own flag, a flag that had symbolized the struggle of Al-Qawasim.
On 15 November 1975, Ajman, Umm Al Quwain, and Fujairah followed suit and replaced their flags with the federation flag. Soon after the flags of the other emirates were lowered and the UAE flag was raised.
Abu Dhabi.
The flag of Abu Dhabi is a red flag with a white rectangle at the top-left corner. According to the 1820 General Maritime Treaty with the British, in times of war a full red flag would be used by the Bani Yas (Abu Dhabi and Dubai).
Although per the 1820 General Maritime Treaty with Britain Abu Dhabi was supposed to fly the Truical States flag, the White Pierced Red flag, in practice Abu Dhabi continued to fly a plain red flag. Percy Cox, the British Colonial Office administrator in the Middle East, was unsuccessful in convincing Zayed bin Khalifa Al Nahyan to adopt the Trucial States flag, which, Zayed argued, represented the Al Qawasim tribal federation. Abu Dhabi later adopted a red flag with a top left white rectangle to distinguish it from the surrounding emirates. 
Ajman and Dubai.
The flags of Ajman and Dubai are identical. They are both plain red with a white bar at the hoist, i.e. closest to the flag staff. The flag is known as the White Red Halved and was adopted as an alternative to the Sharjah and Ras Al Khaimah White Pierced Red by the Emirate of Dubai and Ajman to distinguish their authority from the Al Qawasim in defiance of the bonds of the 1820 General Maritime Treaty with the British. To the British, this flag was titled as Truical Coast Flag No.1 and Abu Dhabi and Umm Al Quwain were also expected to adopt it. According to the 1820 General Maritime Treaty with the British, in times of war a full red flag would be used by the Bani Yas (Abu Dhabi and Dubai) and a full white flag would be used by Ajman.
The Shihuh of Musandam Peninsula (Ruus Al Jibal) also had a similar flag.
Fujairah.
Before 1952, the flag of Fujairah was plain red. Fujairah did not sign the general treaty in 1820 with the British protectorate and therefore is still using its red plain flag. From 1952 to 1961, the emirate's name was added to the flag, and a red flag with a white Arabic calligraphy of the emirate name was adopted as an ensign to distinguish it from the surrounding emirates. From 1961 to 1975, the emirate used a plain red flag again. In 1975, the flag was replaced with the national flag of the United Arab Emirates.
Ras Al Khaimah and Sharjah.
The flags of Ras Al Khaimah and Sharjah are identical as they are both ruled by two branches of the same house. They show a large red rectangle on a white background. The flag is known as the White Pierced Red and was the intended flag for all the Truical States according to the 1820 Maritime Treaty of the Truical States with the British. It was widely attributed to the Al Qawasim tribal federation. Percy Cox, the British Colonial Office administrator in the Middle East, was unsuccessful in convincing the rest of the emirates Sheikhs to adopt it. To the British, this flag was titled as Truical Coast Flag No.2. According to the 1820 General Maritime Treaty with the British, in times of war the original Al Qassimi flag (green, white and red flag) would be used by the Qawasim.
Umm Al Quwain.
The flag of Umm Al Quwain consists of a red background, a white bar at the hoist similar the flags of Ajman and Dubai, and a large white star and crescent in the center as a symbol of Islam and representing allegiance to the Islamic world. Umm Al Quwain flag was supposed to be the same flag used by Dubai and Ajman, the White Red Halved, but a star and crescent was added to distinguish it from the surrounding emirates.