The nation of Georgia ( "sakartvelo") was first unified as a kingdom under the Bagrationi dynasty by the King Bagrat III of Georgia in the early 11th century, arising from a number of predecessor states of the ancient kingdoms of Colchis and Iberia. The Kingdom of Georgia flourished during the 10th to 12th centuries under King David IV the Builder and Queen Tamar the Great, and fell to the Mongol invasion by 1243, and after a brief reunion under George V the Brilliant 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 Ottoman and Iranian (Safavid, Afsharid, and Qajar) domination until Georgia was finally annexed by the Russian Empire in the 19th century. After a brief bid for independence with the Democratic Republic of Georgia of 1918–1921, Georgia was part of the Transcaucasian Socialist Federative Soviet Republic from 1922 to 1936, and then formed the Georgian Soviet Socialist Republic until the dissolution of the Soviet Union.