At first Babar consolidated his rule in Fergana, and then in 1496AD, attacked Samarkand but failed. However another attempt after one year proved fruitful. He had spent hardly 100 days in Samarkand, when he got the news that his cousin has captured Fergana. Babar immediately left Samarkand for Fergana, but eventually lost both. However, he was not disheartened. Another attempt to Samarkand and Fergana was also unsuccessful. At last in 1498AD, he succeeded in recapturing Fergana. In 1500AD, Babar had conquered Samarkand.