At the end of the Rurik Dynasty in 1598, a short period of civil unrest followed before the establishment of the Romanov Dynasty, which would last for over 300 years between 1613–1917. During this time Russia expanded massively, taking over much of northern Asia and moving into eastern Europe through a combination of military conquest and diplomatic annexation. Throughout the 17th century, Russia conquered much of the barren wilderness of Siberia and the far east of northern Asia, which was inhabited by native nomadic tribespeople. A boundary formed where the Russians encountered the more technologically advanced armies of China and Mongolia. Russia moved into the territories of the weakening Ottoman-allied Crimean Khanate in 1783 and began a series of expansions into the Caucasus. Russian explorers crossed to Alaska in the late 18th century, opening it up to hunters and traders, though it was sold to the US in 1768. In the 19th century Russia expanded south into Central Asia with the invasion of Turkestan and its khanates. Japan gave Russia full sovereignty over the island of Sakhalin in 1875.