The nation of Georgia was first unified as a kingdom under the Bagrationi dynasty in the 9th to 10th century, arising from a number of predecessor states of ancient Colchis and Iberia. The kingdom of Georgia flourished during the 10th to 12th centuries, and fell to the Mongol invasions of Georgia and Armenia by 1243, and after a brief reunion under George V of Georgia to the Timurid Empire. By 1490, Georgia was fragmented into a number of petty kingdoms and principalities, which throughout the Early Modern period struggled to maintain their autonomy against Safavid and Ottoman domination until Georgia was finally annexed by the Russian Empire in 1801. After a brief bid for independence with the Democratic Republic of Georgia of 1918–1921, Georgia was part of theTranscaucasian Socialist Federative Soviet Republic from 1922 to 1936, and then formed the Georgian Soviet Socialist Republic until the dissolution of the Soviet Union.The current Republic of Georgia has been independent since 1991. The first president Zviad Gamsakhurdia stoked Georgian nationalism and vowed to assert Tbilisi's authority over Abkhazia and South Ossetia. Gamsakhurdia was deposed in a bloody coup d'état within the year and the country became embroiled in a bitter civil war, which lasted until 1995. Supported by Russia, Abkhazia and South Ossetia achieved de facto independence from Georgia. The Rose Revolution forced Eduard Shevardnadze to resign in 2003. The new government under Mikheil Saakashvili prevented the secession of a third breakaway republic in the Ajaria Crisis of 2004, but the conflict with Abkhazia and South Ossetia led to the 2008 Russo-Georgian War and tensions with Russia remain unresolved.