Omanís history begins in the early 3rd or late 4th millennium bc, with the rise of a society that had cultural and trade ties to ancient Mesopotamia. Between the 4th century bc and the 7th century ad the area was dominated by successive Persian empires. In the 1st century ad Arab tribes began to migrate into Oman and, when it accepted Islam just before the Prophet Muhammad died in 632, Persian rule ended and Omanís Arab character was firmly established. In 751 Ibadi Muslims, a moderate branch of the Kharijites, established an imamate in Oman. Despite interruptions, the Ibadi imamate survived until the mid-20th century.
Contact with the Western world began when Portugal seized Masqat and other coastal strongholds in the early 16th century and held them until the mid-17th century. The imamate then flourished again under the YaĎaribah dynasty, which extended Omani rule or influence to both sides of the Persian Gulf and East Africa. By the mid-18th century a civil war ended YaĎaribah rule and the current Al Bu Said dynasty emerged in 1749. The Al Bu Said rulers soon ceased to hold the title of imam and moved their capital from the traditional Ibadi seat at Nizwa to Masqat to concentrate on maritime commerce. At the beginning of the 19th century the rulers established a close security relationship with Britain; this initially helped to protect them from external threats and later from the forces of the imamate, which was revived in 1913. From 1856 the area was known as the Sultanate of Masqat and Oman. The 1920 Treaty of As Sib then gave formal recognition to the split that had developed between the sultanate in Masqat and the tribally based imamate in the interior. With British assistance, Sultan Said bin Taimur defeated the imamate in 1954 and thwarted a final effort to restore the imam in 1959. In the 1960s, however, Sultan Saidís failure to use Omanís new oil income for economic and social development created serious discontent. This led to a tribal rebellion in Dhofar that was absorbed and expanded by a radical leftist movement, called the Popular Front for the Liberation of the Occupied Arab Gulf (PFLOAG), that was under the influence of the new Marxist state of South Yemen.
Sultan Qaboos came to power in July 1970 when members of the Omani government and senior British advisers removed Said as sultan. The countryís name was then changed from the Sultanate of Masqat and Oman to the Sultanate of Oman. Assisted by the United Kingdom, Iran (under the shah), and other countries, the new ruler ended the rebellion with effective military and socioeconomic action. He pushed for the rapid development of transportation, communications, and other infrastructure throughout the country. Although he inherited nearly absolute power, Qaboos has liberalized Omanís government and is very popular with most Omanis.
In foreign relations Qaboos has pursued an independent course. He supported the 1979 peace treaty between Egypt and Israel and entered into a security agreement with the United States in 1980, both times defying general international Arab opinion. He supported Iraq in its 1980-1988 war with Iran, but soon after the war he improved relations with Iran. Qaboos unsuccessfully tried to mediate the crisis that followed Iraqís invasion of Kuwait in August 1990. He joined the coalition that was formed against Iraq and made Omani facilities available to both British and U.S. military forces during the 1991 Persian Gulf War. Oman has supported the Israeli-Palestinian peace process and has tried to promote the normalization of Arab relations with Israel.