Azerbaijan combines the heritage of two venerable civilizations--the Seljuk Turks of the 11th century and the ancient Persians. Its name is thought to be derived from the Persian phrase "Land of Fire," referring both to its petroleum deposits, known since ancient times, and to its status as a former center of the Zoroastrian faith. The Azerbaijani Republic borders the Iranian provinces of East and West Azerbaijan, although they have not been united into a single state in modern times.
Little is known about Azerbaijan's history until its conquest and conversion to Islam by the Arabs in 642 AD. Centuries of prosperity as a province of the Muslim caliphate followed. After the decline of the Arab Empire, Azerbaijan was ravaged during the Mongol invasions but regained prosperity in the 13th-15th centuries under the Mongol II-Khans, the native Shirvan Shahs, and under Persia's Safavid Dynasty.
Due to its location astride the trade routes connecting Europe to Central Asia and the Near East and on the shore of the Caspian Sea, Azerbaijan was fought over by Russia, Persia, and the Ottomans for several centuries. Finally the Russians split Azerbaijan's territory with Persia in 1828 by the Treaty of Turkmenchay, establishing the present frontiers and extinguishing the last native dynasties of local Azerbaijani khans. The beginning of modern exploitation of the oil fields in the 1870s led to a period of unprecedented prosperity and growth in the years before World War I.
At the collapse of the Russian Empire in 1917, an independent republic was proclaimed in 1918 following an abortive attempt to establish a Transcaucasian Republic with Armenia and Georgia. Azerbaijan received de facto recognition by the Allies as an independent nation in January 1920, an independence terminated by the arrival of the Red Army in April. Incorporated into the Transcaucasian Federated Soviet Socialist Republic in 1922, Azerbaijan became a union republic of the USSR in 1936.
The late 1980s were characterized by increasing unrest, eventually leading to a violent confrontation when Soviet troops killed 190 nationalist demonstrators in Baku in January 1990. Azerbaijan declared its independence from the USSR on August 30, 1991.