The Crimean Khanate, which had become a vassal state of the Ottoman Empire in 1475, subjugated what remained of the Great Horde, sacking Sarai in 1502. After seeking refuge in Lithuania, Sheikh Ahmed, last Khan of the Horde, died in prison in Kaunas some time after 1504. According to other sources, he was released from the Lithuanian prison in 1527.[10]