Mongol rule in Galicia ended with its conquest by the Kingdom of Poland (1025–1385) in 1349. The Golden Horde entered severe decline after the death of Berdi Beg in 1359, which started a protracted political crisis lasting two decades. In 1363, the Grand Duchy of Lithuania won the Battle of Blue Waters against the Golden Horde and conquered both Kiev and Podolia. After 1360, payment of tribute and taxes from Rus' subjects to the declining Golden Horde decreased significantly. In 1374, Nizhny Novgorod rebelled and slaughtered an embassy sent by Mamai. For a brief period after the victorious Battle of Kulikovo in 1380 by Dmitry Donskoy against Mamai, the Grand Duchy of Moscow was free of Mongol control until Tokhtamysh restored Mongol suzerainty over Moscow two years later with the Siege of Moscow (1382). Tokhtamysh also crushed the Lithuanian army at Poltava in the next year. Władysław II Jagiełło, Grand Duke of Lithuania and King of Poland, accepted his supremacy and agreed to pay tribute in turn for a grant of Rus' territory. In 1395, Timur annihilated Tokhtamysh's army again at the Battle of the Terek River, destroyed his capital, looted the Crimean trade centers, and deported the most skillful craftsmen to his own capital in Samarkand. Timur's forces reached as far north as Ryazan before turning back. Tokhtamysh fled to the Grand Duchy of Lithuania and asked Vytautas for assistance in retaking the Golden Horde in exchange for suzerainty over the Rus' lands. In 1399, Vytautas and Tokhtamysh attacked Temür Qutlugh and Edigu at the Battle of the Vorskla River but were defeated. The Golden Horde victory secured for it Kiev, Podolia, and some land in the lower Bug River basin. Tokhtamysh died in obscurity in Tyumen around 1405. His son Jalal al-Din fled to Lithuania and participated in the Battle of Grunwald against the Teutonic Order.