Very little is known about pre-Islamic culture in the south-east Arabian peninsula, except that many ancient towns in the area were trading centers between the Eastern and Western worlds. The remnants of an ancient mangrove swamp, dated at 7,000 years, were discovered during the construction of sewer lines near Dubai Internet City. The area had been covered with sand about 5,000 years ago as the coastline retreated inland, becoming a part of the city's present coastline.
Prior to Islam, the people in this region worshiped Bajir (or Bajar). The Byzantine and Sassanian empires constituted the great powers of the period, with the Sassanians controlling much of the region. After the spread of Islam in the region, the Umayyad Caliph, of the eastern Islamic world, invaded south-east Arabia and drove out the Sassanians.
Excavations undertaken by the Dubai Museum in the region of Al-Jumayra (Jumeirah) indicate the existence of several artifacts from the Umayyad period. The earliest recorded mention of Dubai is in 1095, in the "Book of Geography" by the Andalusian-Arab geographer Abu Abdullah al-Bakri. The Venetian pearl merchant Gaspero Balbi visited the area in 1580 and mentioned Dubai (Dibei) for its pearling industry. Documented records of the town of Dubai exist only after 1799. In the early 19th century, the Al Abu Falasa clan (House of Al-Falasi) of Bani Yas clan established Dubai, which remained a dependent of Abu Dhabi until 1833.
On 8 January 1820, the sheikh of Dubai and other sheikhs in the region signed the "General Maritime Peace Treaty" with the British government. However, in 1833, the Al Maktoum dynasty (also descendants of the House of Al-Falasi) of the Bani Yas tribe left the settlement of Abu Dhabi and took over Dubai from the Abu Fasala clan without resistance. Dubai came under the protection of the United Kingdom by the "Exclusive Agreement" of 1892, with the latter agreeing to protect Dubai against any attacks from the Ottoman Empire.
Two catastrophes struck the town during the 1800s. First, in 1841, a smallpox epidemic broke out in the Bur Dubai locality, forcing residents to relocate east to Deira. Then, in 1894, fire swept through Deira, burning down most homes. However, the town's geographical location continued to attract traders and merchants from around the region.
The emir of Dubai was keen to attract foreign traders and lowered trade tax brackets, which lured traders away from Sharjah and Bandar Lengeh, which were the region's main trade hubs at the time.
Al Fahidi Fort, built in 1799, is the oldest existing building in Dubai.
Dubai's geographical proximity to India made it an important location. The town of Dubai was an important port of call for foreign tradesmen, chiefly those from India, many of whom eventually settled in the town. Dubai was known for its pearl exports until the 1930s. However, Dubai's pearling industry was damaged irreparably by the events of World War I, and later on by the Great Depression in the late 1920s. Consequently, the city witnessed a mass migration of people to other parts of the Persian Gulf.
Since its inception, Dubai was constantly at odds with Abu Dhabi. In 1947, a border dispute between Dubai and Abu Dhabi on the northern sector of their mutual border, escalated into war between the two states. Arbitration by the British and the creation of a buffer frontier running south eastwards from the coast at Ras Hasian resulted in a temporary cessation of hostilities. However, border disputes between the emirates continued even after the formation of the UAE; it was only in 1979 that a formal compromise was reached that ended hostilities and border disputes between the two states.
Electricity, telephone services and an airport were established in Dubai in the 1950s, when the British moved their local administrative offices from Sharjah to Dubai. In 1966 the town joined the newly independent country of Qatar to set up a new monetary unit, the Qatar/Dubai Riyal, after the devaluation of the Persian Gulf rupee.
Oil was discovered in Dubai the same year, after which the town granted concessions to international oil companies. The discovery of oil led to a massive influx of foreign workers, mainly Indians and Pakistanis. As a result, the population of the city from 1968 to 1975 grew by over 300%, by some estimates.
On 2 December 1971 Dubai, together with Abu Dhabi and five other emirates, formed the United Arab Emirates after former protector Britain left the Persian Gulf in 1971. In 1973, Dubai joined the other emirates to adopt a uniform currency: the UAE dirham.
In the 1970s, Dubai continued to grow from revenues generated from oil and trade, even as the city saw an influx of Lebanese immigrants fleeing the civil war in Lebanon.
The Jebel Ali Free Zone, comprising the Jebel Ali port (reputedly the world's largest man made port) was established in 1979, which provided foreign companies unrestricted import of labour and export capital.
The Persian Gulf War of 1990 had a huge impact on the city. Economically, Dubai banks experienced a massive withdrawal of funds due to uncertain political conditions in the region. During the course of the 1990s, however, many foreign trading communities - first from Kuwait, during the Persian Gulf War, and later from Bahrain, during the Shia unrest, moved their businesses to Dubai.
Dubai provided refueling bases to allied forces at the Jebel Ali free zone during the Persian Gulf War, and again, during the 2003 Invasion of Iraq. Large increases in oil prices after the Persian Gulf War encouraged Dubai to continue to focus on free trade and tourism. The success of the Jebel Ali free zone allowed the city to replicate its model to develop clusters of new free zones, including Dubai Internet City, Dubai Media City and Dubai Maritime City.
The construction of Burj Al Arab, the world's tallest freestanding hotel, as well as the creation of new residential developments, were used to market Dubai for purposes of tourism.
Since 2002, the city has seen an increase in private real estate investment in recreating Dubai's skyline with such projects as The Palm Islands, The World Islands and Burj Dubai. However, robust economic growth in recent years has been accompanied by rising inflation rates (at 11.2% as of 2007 when measured against Consumer Price Index) which is attributed in part due to the near doubling of commercial and residential rental costs, resulting in a substantial increase in the cost of living for residents.