One thing history tells us is to never piss off Tamerlane. Tokhtamysh, bolstered by his conquests, tried to bring Persia under his rule, coming into conflict with Tamerlane in 1385. Big. Mistake. Tokhtamysh was defeated and deposed in 1395, where he fled to a very unlikely haven; the Grand Duchy of Lithuania, and struck up an alliance with its Grand Duke, Vytautas. Tokhtamysh had fought successfully against Vytautas’ father Kestutis in the 1380s, but this was much, much different. Vytautas gathered an alliance of Eastern European that marched from Moldavia and conquered its way to northern Crimea, but it was badly defeated at the Vorskla River in 1398 by two of Tamerlane’s generals (and a large army of Tatars. It’d be pretty embarrassing to lose to just two guys). Vytautas escaped with his life and the battle halted Lithuanian expansion into the Black Sea region. Tokhtamysh fled into the steppes but was killed by rivals in the early 1400s. Tamerlane died in 1405, in case you were wondering.
Surviving members of Tokhtamysh’s faction were granted asylum within the Grand Duchy by Vytautas, and also given land and nobility status, where they became known as the Lipka Tatars. In 1410, at the battle of Tannenberg/Grunwald/Zalgiris (depends on who you talk to), Tatar light cavalry served alongside Vytautas’ Lithuanians and Jogaila/Jagiello’s Poles. The battle was a crushing defeat for the Teutonic Order of warrior monks, and halted their expansion in the Baltic.
The Lipka Tatars remained in service as nobles and valuable cavalrymen in the Grand Duchy of Lithuania and in the Polish-Lithuanian Commonwealth that followed it, and maintained their Muslim faith even as Lithuania transitioned from a pagan to a Christian land, and are still a well-defined ethnic minority in Lithuania, Poland, and Belarus.
And that’s an incomplete, imperfect and utterly confusing history of the Lipka Tatars and how they got to Lithuania. And knowing is good.