Kadiya was assured of safety from the destruction of the wells. When they awoke and began to prepare, it was already very late. The Moroccans were at the gates, and Askia Ishak had to face the rifle campaign of the Moroccans and the Askians. Askia Ishak requested submission from Goudar and met the Lishans in the famous battle of Tondi on the Niger. The Askia could not withstand the treacherous weapons and their power. While Askia Ishak was preparing for another battle, his advisor, Al-Haj Bou Bakr Al-Amri, a slave of the Sultan of Kanem, deceived him and convinced him not to fight. Askia returned to Gao, defeated and lacking any desire for battle. In the end, he was forced to negotiate with Goudar, who had already entered Gao. Goudar had no illusions about the wealth of Sudan after seeing the state of Gao with his own eyes, but he was not averse to peace. He quickly presented Askia Ishak's terms to the Sultan. Askia had expressed his desire to recognize the sovereignty of Morocco, to pay one hundred thousand mithqals of gold and a number of slaves, and to allow the export of ivory and slaves in exchange for the immediate withdrawal from Sudan. However, the Sultan was not aware of the true extent of Goudar's achievement and was disheartened by the meager results of the campaign. He thought that changing the leaders might yield better results. He sent Muhammad bin Zarqun, an Askian prisoner himself, to Goudar, while Askia was trying in every way to appease Goudar. The condition of the Moroccan army was dire, the heat was intense, and diseases were decimating his men and horses. Askia advised Goudar to move his men to Timbuktu, where conditions were better and the climate less harsh. He responded to the advice. The arrival of Ibn Zarqun disrupted the plans of both Askia and Goudar. Ibn Zarqun did his best to sow discord between the Askia and Goudar. The divisions helped.